function evaluateLambda(expr, input, environment) {
        // make a function (closure)
        var procedure = {
            _jsonata_lambda: true,
            input: input,
            environment: environment,
            arguments: expr.arguments,
            signature: expr.signature,
            body: expr.body
        };
        if(expr.thunk === true) {
            procedure.thunk = true;
        }
        procedure.apply = async function(self, args) {
            return await apply(procedure, args, input, !!self ? self.environment : environment);
        };
        return procedure;
    }
Evaluate lambda against input data
@param {Object} expr - JSONata expression
@param {Object} input - Input data to evaluate against
@param {Object} environment - Environment
@returns {{lambda: boolean, input: *, environment: *, arguments: *, body: *}} Evaluated input data