mirror of
https://github.com/peklaiho/madlisp.git
synced 2024-12-27 08:28:47 +00:00
add macros when and unless
This commit is contained in:
parent
8f4edd2106
commit
9aa9d4b20f
@ -55,6 +55,9 @@ class LispFactory
|
||||
$lisp->readEval('(def defn (macro (name args body) (quasiquote (def (unquote name) (fn (unquote args) (unquote body))))))');
|
||||
$lisp->readEval('(def defmacro (macro (name args body) (quasiquote (def (unquote name) (macro (unquote args) (unquote body))))))');
|
||||
|
||||
$lisp->readEval('(def when (macro (test body) (quasiquote (if (unquote test) (unquote body) null))))');
|
||||
$lisp->readEval('(def unless (macro (test body) (quasiquote (if (unquote test) null (unquote body)))))');
|
||||
|
||||
// Separate environment for user-defined stuff
|
||||
$lisp->setEnv(new Env('user', $env));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user