This commit is contained in:
2020-12-31 14:05:46 -07:00
parent 186024a5ff
commit de3577eb85
4 changed files with 104 additions and 2 deletions

View File

@@ -370,4 +370,13 @@
(Assert.equals 5 (doSomething (lambda [i] i)))
(Assert.equals 7 (doSomething (lambda [i] (+ i 2))))
// Pass null to the really crazy one because I'm lazy:
(Assert.equals "but it still compiles" (itsAMonster null)))
(Assert.equals "but it still compiles" (itsAMonster null)))
(defmacro defconstfunc [name const] `(defun ,name [] ,const))
(defconstfunc func5 5)
(defconstfunc funcHello "hello")
(defun _testDefmacro []
(Assert.equals 5 (func5))
(Assert.equals "hello" (funcHello)))