Created
December 11, 2012 12:35
-
-
Save moritz/4258258 to your computer and use it in GitHub Desktop.
Remaining sink problem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my @a = [<A B>], 'Z'; | |
my @res := gather for @a { | |
if $_ ~~ Array { | |
take $_ for @$_; | |
} else { | |
take ~$_; | |
} | |
} | |
say @res.perl; | |
# OUTPUT: | |
# ("Z", "A", "B").list |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment