This is similar to/a extention of an idea juerd meditated upon (and which I completely missed the point of originally) this time last year at Non-destructive array processing.
Seems to me that some variation of this could be added to List::Util therebye hiding the obscure nature of the technique behind a standard interface and lifting it out of the realms of "clever code" to a useful, usable idiom?
In reply to Re: Preserve @_ aliasing a (scalar||array)
by BrowserUk
in thread Preserve @_ aliasing a (scalar||array)
by bsb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |