|go ahead... be a heretic|
Re: A list assignment gotchaby LanX (Cardinal)
|on Jul 30, 2020 at 11:37 UTC||Need Help??|
> plain assignment will operate on lists, but modifying assignments (+= in the example that I recall) will not
If you really needed this, it could be done with a little syntactic sugar
L($x,$y,$z) += L(1,2,3);
the trick would be to let L() ( for "list" ) return an object with overload ed operators (in scalar context) performing the side-effect
Tho I'm not sure if the RHS needs to be packed into an object too, but I assume += is imposing scalar context.