diff --git a/chapter3g/interpreter.coffee b/chapter3g/interpreter.coffee index 6e86144..690773a 100644 --- a/chapter3g/interpreter.coffee +++ b/chapter3g/interpreter.coffee @@ -389,7 +389,7 @@ definitial "apply", new Primitive "apply", (values, env, kont) -> definitial "funcall", new Primitive "funcall", (args, env, kont) -> if not nilp cdr args - @kont.invoke (car args), (cdr args) + kont.invoke (env.lookup (car args)), (cdr args) else throw new LispInterpreterError "Invoke requires a function name and arguments"