Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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 {
- say $_;
- }
- }
- dl($test.comb);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement