Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
multi conjunct ($, *[]) { '' }
multi conjunct ($, $word) { $word }
multi conjunct ($conj, *@words) { "{@words[0..*-2].join: ', '} $conj @words[*-1]" }
say conjunct "and";
say conjunct "and", "one apple";
say conjunct "and", "one apple", "two oranges";
say conjunct "and", "one apple", "two oranges", "three pears";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment