-- quotation.lua local function quotation_call(quote, env) if rawget(quote, "namespace") then env.namespace:push(quote.namespace) end for _, item in ipairs(quote.body) do local typ = type(item) if typ == "number" or typ == "boolean" or typ == "string" or (typ == "table" and item.type == "quote") then env.data:push(item) else item(env) end end if rawget(quote, "namespace") then env.namespace:pop() end end -- gilded.lua builtins["call"] = function(env) env:assertHeight(1) local quote = env.data:pop() return quote(env) end -- snipped -- local env = enviroment.new() for _, item in ipairs(program) do local typ = type(item) if typ == "number" or typ == "boolean" or typ == "string" or (typ == "table" and item.type == "quote") then env.data:push(item) else item(env) end end