1
1
mirror of https://github.com/kanaka/mal.git synced 2024-11-11 00:52:44 +03:00
mal/julia/step0_repl.jl
2015-10-24 15:41:22 -05:00

31 lines
402 B
Julia
Executable File

#!/usr/bin/env julia
push!(LOAD_PATH, pwd(), "/usr/share/julia/base")
import readline_mod
# READ
function READ(str)
str
end
# EVAL
function EVAL(ast, env)
ast
end
# PRINT
function PRINT(exp)
exp
end
# REPL
function REP(str)
return PRINT(EVAL(READ(str), []))
end
while true
line = readline_mod.do_readline("user> ")
if line === nothing break end
println(REP(line))
end