diff options
| author | Joel Martin <github@martintribe.org> | 2014-03-24 16:32:24 -0500 |
|---|---|---|
| committer | Joel Martin <github@martintribe.org> | 2014-03-24 16:32:24 -0500 |
| commit | 3169070063b2cb877200117ebb384269d73bcb93 (patch) | |
| tree | 23de3db1ea5c37afd21a45b6ed7771f56a08c0c4 /bash/step0_repl.sh | |
| download | mal-3169070063b2cb877200117ebb384269d73bcb93.tar.gz mal-3169070063b2cb877200117ebb384269d73bcb93.zip | |
Current state of mal for Clojure West lighting talk.
Diffstat (limited to 'bash/step0_repl.sh')
| -rwxr-xr-x | bash/step0_repl.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/bash/step0_repl.sh b/bash/step0_repl.sh new file mode 100755 index 0000000..261ecc2 --- /dev/null +++ b/bash/step0_repl.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +READ () { + read -u 0 -e -p "user> " r +} + +EVAL () { + r= + eval "${1}" +} + +PRINT () { + r="${1}" +} + +while true; do + READ + EVAL "${r}" + PRINT "${r}" + echo "${r}" +done |
