Skip to content

Instantly share code, notes, and snippets.

@ahalbert
Last active December 10, 2016 14:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ahalbert/748b49d697062a834057a03b30bf7396 to your computer and use it in GitHub Desktop.
Save ahalbert/748b49d697062a834057a03b30bf7396 to your computer and use it in GitHub Desktop.
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