about summary refs log tree commit diff stats
path: root/eval2.lua
diff options
context:
space:
mode:
Diffstat (limited to 'eval2.lua')
-rw-r--r--eval2.lua39
1 files changed, 0 insertions, 39 deletions
diff --git a/eval2.lua b/eval2.lua deleted file mode 100644 index 02444b8..0000000 --- a/eval2.lua +++ /dev/null
@@ -1,39 +0,0 @@
1--- lam.eval
2
3local eval = {}
4local read = require "read"
5local util = require "util"
6local types = require "types"
7table.unpack = table.unpack or unpack
8
9local Environment =
10 function (inner, outer)
11 -- an Environment is really just a lua table between symbols and
12 -- values. They can be nested for uh, closure reasons or
13 -- something. TODO: figure out how this intersects with
14 -- Namespaces or Symboltables or whatever.
15 local mt = {
16 __type = "Environment",
17 __index = outer,
18 }
19 return setmetatable(inner, mt)
20 end
21
22local Procedure =
23 function (params, body, env)
24 local proc = {
25 params = params,
26 body = body,
27 env = env,
28 }
29 local mt = {
30 __type = "Procedure",
31 __call =
32 function (self, ...)
33 end,
34 }
35 return setmetatable(proc, mt)
36 end
37
38---
39return eval