January 14, 2015
> 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.

Actually, isn't your closure even weakly pure in your example, because arr is part of the closure and thus an argument to it.
January 15, 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?
1 2
Next ›   Last »