Last active
December 10, 2016 14:27
-
-
Save ahalbert/748b49d697062a834057a03b30bf7396 to your computer and use it in GitHub Desktop.
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 Str $test = q{ULL | |
RRDDD | |
LURDL | |
UUUUD | |
}; | |
subset DirectionList of List where { .map({$_ ~~ Str and $_ ~~ 'U'|'D'|'L'|'R'|"\n"}) ==> reduce { $^a and $^b} } | |
say $test.comb ~~ DirectionList; | |
sub dl(DirectionList $d) is export { | |
for $d.List { | |
say $_; | |
} | |
} | |
dl($test.comb); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment