mirror of
https://github.com/kanaka/mal.git
synced 2024-11-11 08:56:41 +03:00
17 lines
291 B
Io
17 lines
291 B
Io
READ := method(str, str)
|
|
|
|
EVAL := method(ast, env, ast)
|
|
|
|
PRINT := method(exp, exp)
|
|
|
|
RE := method(str, EVAL(READ(str), nil))
|
|
|
|
REP := method(str, PRINT(RE(str)))
|
|
|
|
loop(
|
|
line := MalReadline readLine("user> ")
|
|
if(line isNil, break)
|
|
if(line isEmpty, continue)
|
|
REP(line) println
|
|
)
|