diff options
| author | def <dennis@felsin9.de> | 2015-02-28 05:15:38 +0100 |
|---|---|---|
| committer | def <dennis@felsin9.de> | 2015-02-28 05:15:38 +0100 |
| commit | 937f0cdc6614592b9057c023be67b8ff0db8758c (patch) | |
| tree | 6125670c5e26b736b964aaf6f1f3a5a67c8ce4fa | |
| parent | 1218ce98a40ef243824fed0efce7160a10fe5f36 (diff) | |
| download | mal-937f0cdc6614592b9057c023be67b8ff0db8758c.tar.gz mal-937f0cdc6614592b9057c023be67b8ff0db8758c.zip | |
Nim: step0
| -rw-r--r-- | nim/mal.nimble | 11 | ||||
| -rw-r--r-- | nim/step0_repl.nim | 11 |
2 files changed, 22 insertions, 0 deletions
diff --git a/nim/mal.nimble b/nim/mal.nimble new file mode 100644 index 0000000..f512616 --- /dev/null +++ b/nim/mal.nimble @@ -0,0 +1,11 @@ +[Package] +name = "mal" +version = "1.0" +author = "Dennis Felsing" +description = "Mal code in Nim" +license = "MIT" + +bin = "step0_repl" + +[Deps] +Requires: "nim >= 0.10.0" diff --git a/nim/step0_repl.nim b/nim/step0_repl.nim new file mode 100644 index 0000000..6ae7d89 --- /dev/null +++ b/nim/step0_repl.nim @@ -0,0 +1,11 @@ +import rdstdin + +proc read(str: string): string = str + +proc eval(ast: string): string = ast + +proc print(exp: string): string = exp + +while true: + let line = readLineFromStdin("user> ") + echo line.read.eval.print |
