about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--core.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/core.lua b/core.lua index 9563904..f6d4e08 100644 --- a/core.lua +++ b/core.lua
@@ -32,6 +32,17 @@ m.env = { -- all functions here take R, which is the list of arguments
32 return r[1] == r[2][1] 32 return r[1] == r[2][1]
33 end, 33 end,
34 -- equal? can be done in-library 34 -- equal? can be done in-library
35 ------- i/o
36 display =
37 function (r)
38 assert_arity(r, 1, 1)
39 io.write(tostring(r[1]))
40 end,
41 newline =
42 function (r)
43 assert_arity(r, 0, 0)
44 io.write("\n")
45 end,
35 ------- numbers 46 ------- numbers
36 -- todo: assert all of these are numbers 47 -- todo: assert all of these are numbers
37 ["number?"] = 48 ["number?"] =