On Monday, 17 June 2013 at 19:05:07 UTC, monarch_dodra wrote:
# Purity
Because a lambda needs to access the frame, any function using the lambda trick can't be made pure:
void foo(T)(T a) @safe
{
    (){
        ++a;
    }();
}
Error: pure function 'main.foo' cannot call impure function literal '__lambda1'


In case of lambda, purity does the wrong thing. The behavior is bogous.

Reply via email to