Skip to content

Instantly share code, notes, and snippets.

@ronaldxs
Created November 1, 2015 00:53
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save ronaldxs/8e62394e7edcd407caf5 to your computer and use it in GitHub Desktop.
my @bottles = (flat ((3...2) X~ ' bottles'),
'1 bottle',
'no more bottles',
'99 bottles');
my @actions = (flat 'Take one down and pass it around' xx 4,
'Go to the store and buy some more');
my @a = slip(@bottles Z @actions Z @bottles[1..*]);
for @bottles Z @actions Z @bottles[1..*] -> ($a, $b, $c) {
say "$a of beer on the wall, $a of beer. $b, $c of beer on the wall.\n".tc;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment