async function applyProcedure(proc, args) {
        var result;
        var env = createFrame(proc.environment);
        proc.arguments.forEach(function (param, index) {
            env.bind(param.value, args[index]);
        });
        if (typeof proc.body === 'function') {
            // this is a lambda that wraps a native function - generated by partially evaluating a native
            result = await applyNativeFunction(proc.body, env);
        } else {
            result = await evaluate(proc.body, proc.input, env);
        }
        return result;
    }
Apply procedure
@param {Object} proc - Procedure
@param {Array} args - Arguments
@returns {*} Result of procedure