in reply to reduce like iterators
sub compress(*@a) { flat @a Zxx 1, (@a Zne @a[1..*-1]) } say compress(<a a a a b c c a a d e e e e>).perl; [download]
The *-1 is a workaround for a rakudo bug, in a perfect Perl 6 implementation 1..* would work too.