Map Lambda with Side-Effects
"Nordlöw" via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Thu Jan 15 13:11:49 PST 2015
On Wednesday, 14 January 2015 at 01:15:57 UTC, Tobias Pankrath
wrote:
>
>> Is it possible to
>> - detect that a lambda is has-side-effects and that
>> - the map hasn't been used?
>
> Thing is: I'm regularly doing that on purpose.
Could you show me a code example? I'm curious.
> Actually, isn't your closure even weakly pure in your example,
> because arr is part of the closure and thus an argument to it.
I'm fully understand the meaning of weakly and strongly pure
functions in D. However I'm not enough familiar with closure
purity semantics in D. Could you elaborate a bit, please?
More information about the Digitalmars-d-learn
mailing list