Re: Learning the "ff" (flipflop) infix operator? (was Re: Raku version of "The top 10 tricks... .")

2020-08-02 Thread Eirik Berg Hanssen
On Sun, Aug 2, 2020 at 11:14 PM yary wrote: > Issue golf, ff is always evaluating its RHS > > $ raku -e 'say "With ff: ";say ( 1..5 ).grep({False ff .say}); say "With > fff: ";say ( 1..5 ).grep({False fff .say});' > With ff: > 1 > 2 > 3 > 4 > 5 > () > With fff: > () > I haven't looked much at

Re: Learning the "ff" (flipflop) infix operator? (was Re: Raku version of "The top 10 tricks... .")

2020-08-02 Thread yary
Issue golf, ff is always evaluating its RHS $ raku -e 'say "With ff: ";say ( 1..5 ).grep({False ff .say}); say "With fff: ";say ( 1..5 ).grep({False fff .say});' With ff: 1 2 3 4 5 () With fff: () -y On Sun, Aug 2, 2020 at 2:16 PM yary wrote: > tl;dr: is this a Rakudo issue? > > ooh a

Re: Learning the "ff" (flipflop) infix operator? (was Re: Raku version of "The top 10 tricks... .")

2020-08-02 Thread yary
tl;dr: is this a Rakudo issue? ooh a puzzle  why do 'ff' and 'fff' give different results in this case? The start & end are disjoint, the $++ should only run when the string test is true, so I expect 'ff' and 'fff' to behave the same also. Golfing a little $ raku -e 'my @input=qw; \ say "With