in reply to Re^3: reduce like iterators
in thread reduce like iterators
This is really clever and should be included in List::Util: https://rt.cpan.org/Ticket/Display.html?id=150773.my @b = @{ reduce { push @$a, $b if !@$a || $b ne $a->[-1]; $a } [], @ +a };
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: reduce like iterators
by jdporter (Paladin) on Jan 09, 2024 at 14:05 UTC | |
by kcott (Archbishop) on Jan 09, 2024 at 14:50 UTC | |
by ikegami (Patriarch) on Jan 10, 2024 at 15:45 UTC | |
by jdporter (Paladin) on Jan 09, 2024 at 16:27 UTC | |
by kcott (Archbishop) on Jan 10, 2024 at 01:01 UTC | |
by jdporter (Paladin) on Jan 10, 2024 at 15:21 UTC |