diff options
-rw-r--r-- | eval.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/eval.lua b/eval.lua index 714c67e..2e3a2bf 100644 --- a/eval.lua +++ b/eval.lua | |||
@@ -103,6 +103,9 @@ m.specials.def = m.specials.define | |||
103 | function m.eval (x, env) | 103 | function m.eval (x, env) |
104 | local env = env or core.env | 104 | local env = env or core.env |
105 | if type.isa(x, "symbol") then | 105 | if type.isa(x, "symbol") then |
106 | if env[x] == nil then | ||
107 | error(string.format("Unbound variable: %s", x)) | ||
108 | end | ||
106 | return env[x] | 109 | return env[x] |
107 | elseif not type.islist(x) then | 110 | elseif not type.islist(x) then |
108 | return x | 111 | return x |