Help for this page

Select Code to Download


  1. or download this
    my @b = list_reduce { undef, !@$_ || $b ne $_->[-1] ? $b : () } undef,
    + @a;
    
    ...
    my @b = list_reduce { $b, defined($b) && $b ne $a ? $b : () } undef, @
    +a;
    
    my @b = list_reduce { $b, grep defined && $_ ne $a, $b } undef, @a;