diff options
Diffstat (limited to 'eval.lua')
-rw-r--r-- | eval.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/eval.lua b/eval.lua index cdf4612..185268f 100644 --- a/eval.lua +++ b/eval.lua | |||
@@ -10,7 +10,7 @@ local types = require("types") | |||
10 | if not table.unpack then table.unpack = unpack end | 10 | if not table.unpack then table.unpack = unpack end |
11 | 11 | ||
12 | local function Env(inner, outer) | 12 | local function Env(inner, outer) |
13 | return setmetatable(inner, { __type = "Environment", __index = outer, }) | 13 | return setmetatable(inner, { __type = "environment", __index = outer, }) |
14 | end | 14 | end |
15 | 15 | ||
16 | local function Proc(params, body, env) | 16 | local function Proc(params, body, env) |
@@ -20,7 +20,7 @@ local function Proc(params, body, env) | |||
20 | env = env, | 20 | env = env, |
21 | } | 21 | } |
22 | local mt = { | 22 | local mt = { |
23 | __type = "Procedure", | 23 | __type = "procedure", |
24 | __call = | 24 | __call = |
25 | function (self, ...) | 25 | function (self, ...) |
26 | local inner = {} | 26 | local inner = {} |
@@ -37,7 +37,7 @@ end | |||
37 | 37 | ||
38 | function eval.eval (x, e) | 38 | function eval.eval (x, e) |
39 | e = e or global | 39 | e = e or global |
40 | if types.lamtype(x) == "Symbol" then | 40 | if types.lamtype(x) == "symbol" then |
41 | return e[x] | 41 | return e[x] |
42 | elseif types.luatype(x) ~= "table" then | 42 | elseif types.luatype(x) ~= "table" then |
43 | return x | 43 | return x |