about summary refs log tree commit diff stats
path: root/util.lua
diff options
context:
space:
mode:
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