Hi,
"TSa (Thomas Sandlaß)" wrote:
> Ingo Blechschmidt wrote:
>> Is this a bug in S29 or will this be feature removed from Perl 6
>> and you'll have to say (for example)
>>
>> use listops :mutating;
>> my @result = map { $_++; 42 } @array; # works now
>
> Why not just
>
> my @result =
HaloO,
Ingo Blechschmidt wrote:
Is this a bug in S29 or will this be feature removed from Perl 6
and you'll have to say (for example)
use listops :mutating;
my @result = map { $_++; 42 } @array; # works now
Why not just
my @result = map -> $_ is rw { $_++; 42 } @array; # works
Hi,
according to S29 [1], neither map nor grep allow mutation:
multi sub Perl6::Array::map (@values, Code $expression) returns Lazy
multi sub Perl6::List::map (Code $expression : [EMAIL PROTECTED]) returns
Lazy
multi sub Perl6::Array::grep (@values : Code *&test ) returns