On Sat Jun 04 14:10:20 2016, barto...@gmx.de wrote: > > Ah, here (src/core/Any-iterable-methods.pm:1371) is what made me > assume that map caused us to end up in List.iterator -- values seems > to be a List here: > > multi sub map(&code, +values) { my $laze = values.is-lazy; > values.map(&code).lazy-if($laze) }
Another thing to note: Only the sub form of map has the problem: $ perl6-j -e 'my @array = 0..1; @array[0]:delete; say map { $_ }, @array' java.lang.NullPointerException in block <unit> at -e line 1 $ perl6-j -e 'my @array = 0..1; @array[0]:delete; say @array.map( { $_ } )' ((Any) 1) See also my latest comment on the PR: https://github.com/rakudo/rakudo/pull/780#issuecomment-223797798