about summary refs log tree commit diff stats
path: root/core.lua
diff options
context:
space:
mode:
Diffstat (limited to 'core.lua')
-rw-r--r--core.lua18
1 files changed, 18 insertions, 0 deletions
diff --git a/core.lua b/core.lua index 556b5d1..556866c 100644 --- a/core.lua +++ b/core.lua
@@ -29,6 +29,12 @@ end
29-- from what i understand of the spec, it's okay that eqv? and eq? are the same 29-- from what i understand of the spec, it's okay that eqv? and eq? are the same
30env["eq?"] = env["eqv?"] 30env["eq?"] = env["eqv?"]
31 31
32---[[ VALUES ]]---
33
34env.values = function (r)
35 return table.unpack(type.totable(r))
36end
37
32---[[ TYPES ]]--- 38---[[ TYPES ]]---
33 39
34env["boolean?"] = function (r) 40env["boolean?"] = function (r)
@@ -192,6 +198,18 @@ env["/"] = function (r)
192 r[1], r[2]) 198 r[1], r[2])
193end 199end
194 200
201---[[ STRINGS ]]---
202
203env["string-append"] = function (r)
204 assert_arity(r,1)
205 local ss = type.totable(r)
206 local new = {}
207 for i, s in ipairs(ss) do
208 new[i] = s.v
209 end
210 return type.string(table.concat(new))
211end
212
195---[[ INPUT / OUTPUT ]]--- 213---[[ INPUT / OUTPUT ]]---
196 214
197env.dump = function (r) 215env.dump = function (r)