in reply to Re: 99 Problems in Perl6 (Lisp, Prolog, Haskell)
in thread 99 Problems in Perl6
It would be slightly prettier if take could harvest a value en passant.sub group (*@array is copy) { gather { while @array { take [ gather { my $h = shift @array; take $h; while @array and $h eq @array[0] { take shift @array; } } ]; } } }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: 99 Problems in Perl6 (Lisp, Prolog, Haskell)
by Ovid (Cardinal) on Dec 15, 2006 at 23:12 UTC | |
by TimToady (Parson) on Dec 15, 2006 at 23:39 UTC |