@solve.implementation(for_type=ast.Apply)<EOL>def solve_apply(expr, vars):
func = __solve_for_scalar(expr.func, vars)<EOL>args = []<EOL>kwargs = {}<EOL>for arg in expr.args:<EOL><INDENT>if isinstance(arg, ast.Pair):<EOL><INDENT>if not isinstance(arg.lhs, ast.Var):<EOL><INDENT>raise errors.EfilterError(<EOL>root=arg.lhs,<EOL>message="<STR_LIT>")<EOL><DEDENT>kwargs[arg.key.value] = solve(arg.value, vars).value<EOL><DEDENT>else:<EOL><INDENT>args.append(solve(arg, vars).value)<EOL><DEDENT><DEDENT>result = applicative.apply(func, args, kwargs)<EOL>return Result(result, ())<EOL>
Returns the result of applying function (lhs) to its arguments (rest).

    We use IApplicative to apply the function, because that gives the host
    application an opportunity to compare the function being called against
    a whitelist. EFILTER will never directly call a function that wasn't
    provided through a protocol implementation.