This seems disingenuous. While I agree that arguing that assignment is “side-effect free” seems a little strange, your example isn't just assigning, it's mutating. Even in the purest of functional languages, x = 5 is OK (I think!); but x += 1 isn't.I don't consider assignment to have a "side effect". Assignment is the effect.So,is side-effect free?map {$sum += $_} @array;
In reply to Re^5: map in void context
by JadeNB
in thread map in void context
by dharanivasan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |