about summary refs log tree commit diff stats
path: root/util.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 /util.lua
parentMove port.lua to type.lua (diff)
downloadlam-fd3db5c3899daaaefba64479cdf73fcf9c8dbdf3.tar.gz
lam-fd3db5c3899daaaefba64479cdf73fcf9c8dbdf3.zip
Trim util
Diffstat (limited to 'util.lua')
-rw-r--r--util.lua13
1 files changed, 0 insertions, 13 deletions
diff --git a/util.lua b/util.lua index a13912c..7040e33 100644 --- a/util.lua +++ b/util.lua
@@ -2,7 +2,6 @@
2 2
3local m = {} 3local m = {}
4local string = string 4local string = string
5local utf8 = require("utf8")
6 5
7m.luaerror = error 6m.luaerror = error
8 7
@@ -23,17 +22,5 @@ function m.pop (tbl)
23 return table.remove(tbl, 1) 22 return table.remove(tbl, 1)
24end 23end
25 24
26function m.tochars (str)
27 local cs = {}
28 for _, code in utf8.codes(str) do
29 table.insert(cs, code)
30 end
31 return cs
32end
33
34function m.constantly (x)
35 return function () return x end
36end
37
38-------- 25--------
39return m 26return m