1
1
mirror of https://github.com/kanaka/mal.git synced 2024-09-20 01:57:09 +03:00
mal/crystal/step0_repl.cr
2015-06-03 02:26:58 +09:00

27 lines
309 B
Crystal
Executable File

#! /usr/bin/env crystal run
require "./readline"
# Note:
# Employed downcase names because Crystal prohibits uppercase names for methods
def read(x)
x
end
def eval(x)
x
end
def print(x)
x
end
def rep(x)
read(eval(print(x)))
end
while line = my_readline("user> ")
puts rep(line)
end