--- lam.repl local repl = {} local eval = require("eval").eval local read = require("read").read local function schemeprint (x) if x == true then print("#t") elseif x == false then print("#f") else print(x) end end function repl.repl (prompt) if not prompt then prompt = "lam> " end io.input():setvbuf("line") repeat io.write(prompt) io.output():flush() local input = io.read() if input ~= "" then local value = eval(read(input)) if value ~= nil then schemeprint(value) end end until false end --- return repl