my @in = <a a a a b c c a a d e e e e>; say gather for @in -> $i { state $last; $last = take $i if $i ne $last; };
In reply to Re^3: 99 Problems in Perl6
by gaal
in thread 99 Problems in Perl6
by Ovid
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |