HCoop
/
jackhill
/
mal.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
Merge pull request #440 from aasimk2000/add-nil-if-test
[jackhill/mal.git]
/
crystal
/
step0_repl.cr
1
#! /usr/bin/env crystal run
2
3
require "readline"
4
5
# Note:
6
# Employed downcase names because Crystal prohibits uppercase names for methods
7
8
def read(x)
9
x
10
end
11
12
def eval(x)
13
x
14
end
15
16
def print(x)
17
x
18
end
19
20
def rep(x)
21
read(eval(print(x)))
22
end
23
24
while line = Readline.readline("user> ")
25
puts rep(line)
26
end