about summary refs log tree commit diff stats
path: root/core.lua
diff options
context:
space:
mode:
authorCase Duckworth2024-04-13 18:02:05 -0500
committerCase Duckworth2024-04-13 18:02:05 -0500
commitfd3db5c3899daaaefba64479cdf73fcf9c8dbdf3 (patch)
tree3b8ac6b0dd8918273785937d7a7a9bcff47f50ba /core.lua
parentMove port.lua to type.lua (diff)
downloadlam-fd3db5c3899daaaefba64479cdf73fcf9c8dbdf3.tar.gz
lam-fd3db5c3899daaaefba64479cdf73fcf9c8dbdf3.zip
Trim util
Diffstat (limited to 'core.lua')
-rw-r--r--core.lua8
1 files changed, 3 insertions, 5 deletions
diff --git a/core.lua b/core.lua index 556866c..3e4773a 100644 --- a/core.lua +++ b/core.lua
@@ -2,11 +2,9 @@
2 2
3local dump = require("dump") 3local dump = require("dump")
4local type = require("type") 4local type = require("type")
5local utf8 = require("utf8")
6local null = type.null
7local assert_arity, assert_type = type.assert_arity, type.assert_type 5local assert_arity, assert_type = type.assert_arity, type.assert_type
8local util = require("util") 6local null = type.null
9local error = util.error 7local error = require("util").error
10 8
11local function fold (kons, knil, r) 9local function fold (kons, knil, r)
12 if r == null then 10 if r == null then
@@ -111,7 +109,7 @@ end
111env["integer->char"] = function (r) 109env["integer->char"] = function (r)
112 assert_arity(r,1,1) 110 assert_arity(r,1,1)
113 assert_type(r[1], "number") -- todo: check integer 111 assert_type(r[1], "number") -- todo: check integer
114 return type.character(utf8.char(r[1])) 112 return type.character(r[1])
115end 113end
116 114
117env["string->list"] = function (r) 115env["string->list"] = function (r)