On Sun, 08 Jan 2017 05:11:03 -0800, barto...@gmx.de wrote:
> With rakudo commit 3c52aa096c Seq got it's own join method. For some
> reason that changed the behaviour of 'redo' in 'grep'

Also, next/redo in grep die on rakudo-j when using the new join method:

$ ./perl6-j -e 'say (1..4).grep({next if $_ == 3; $_}).join("|")'
next without loop construct

$ $ ./perl6-j -e 'my $retries = 0; say (1..5).grep({if $_ == 3 {$retries++; 
redo unless $retries == 10}; $_}).join("|"); say "looked $retries times for 
element 3"'
redo without loop construct

Please note, that the evaluations work as expected when using perl instead of 
join:

$ ./perl6-j -e 'say (1..4).grep({next if $_ == 3; $_}).perl'
(1, 2, 4).Seq

$ ./perl6-j -e 'my $retries = 0; say (1..5).grep({if $_ == 3 {$retries++; redo 
unless $retries == 10}; $_}).perl; say "looked $retries times for element 3"'
(1, 2, 3, 4, 5).Seq
looked 10 times for element 3

Reply via email to