Help for this page
my @b; for (@a) { push @b, $_ if !@b || $_ ne $b[-1]; }
my @b = list_reduce { 0, $a || $b ne $_->[-1] ? $b : () } 1, @a;