From bf7068d0ad204e62bbfb93a7c4a38157df68782f Mon Sep 17 00:00:00 2001 From: "Elf M. Sternberg" Date: Tue, 4 Aug 2015 08:48:12 -0700 Subject: [PATCH] [feat] unwind-protect now works. Tracked down the last bad reference. --- chapter3g/interpreter.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"