diff options
Diffstat (limited to 'ruby/stepA_more.rb')
| -rw-r--r-- | ruby/stepA_more.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ruby/stepA_more.rb b/ruby/stepA_more.rb index 42eac5b..a2fc5cc 100644 --- a/ruby/stepA_more.rb +++ b/ruby/stepA_more.rb @@ -154,6 +154,7 @@ $core_ns.each do |k,v| repl_env.set(k,v) end repl_env.set(:eval, lambda {|ast| EVAL(ast, repl_env)}) # core.mal: defined using the language itself +RE["(def! *host-language* \"ruby\")"] RE["(def! not (fn* (a) (if a false true)))"] RE["(def! load-file (fn* (f) (eval (read-string (str \"(do \" (slurp f) \")\")))))"] RE["(defmacro! cond (fn* (& xs) (if (> (count xs) 0) (list 'if (first xs) (if (> (count xs) 1) (nth xs 1) (throw \"odd number of forms to cond\")) (cons 'cond (rest (rest xs)))))))"] |
