From c0bcc268a059c3697c0cd48907c04deb558d2028 Mon Sep 17 00:00:00 2001 From: "Kenneth M. Elf Sternberg" Date: Mon, 1 Jun 2015 10:08:17 -0700 Subject: [PATCH] Commented invoke() usage. --- chapter3/interpreter.coffee | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/chapter3/interpreter.coffee b/chapter3/interpreter.coffee index b793ceb..258fb5f 100644 --- a/chapter3/interpreter.coffee +++ b/chapter3/interpreter.coffee @@ -175,7 +175,13 @@ evaluate = (e, env) -> when "begin" then eprogn (cdr exp), env when "set!" then update (nvalu cadr exp), env, (evaluate (caddr exp), env) when "lambda" then make_function (astSymbolsToLispSymbols cadr exp), (cddr exp), env - else invoke (evaluate (car exp), env), (evlis (cdr exp), env) + + else + # Note that invoke ultimately resolves to a (native) + # function generated by make_function, and a (interpreter) + # list that the generated (native) function knows how to + # unpack into the actual (native) operation. + invoke (evaluate (car exp), env), (evlis (cdr exp), env) else invoke (evaluate (car exp), env), (evlis (cdr exp), env) else