lambdas can be returned, so they better retain a copy of the environment