sub compress { my @x; !@x || $_ ne $x[-1] and push @x, $_ for @{$_[0]}; \@x } [download]
In reply to Re: reduce like iterators by NERDVANA in thread reduce like iterators by LanX