merge branch 'f/empty-cond'

This commit is contained in:
Zack M. Davis 2015-08-18 23:23:00 -07:00
commit 6916eea604
2 changed files with 23 additions and 19 deletions

View File

@ -67,6 +67,9 @@
bar
(if baz
quux))"
(if (empty? branches)
nil
(do
(setv branches (iter branches))
(setv branch (next branches))
(defn check-branch [branch]
@ -86,7 +89,7 @@
(setv cur-branch (check-branch branch))
(.append latest-branch cur-branch)
(setv latest-branch cur-branch))
root)
root)))
(defmacro for [args &rest body]

View File

@ -231,7 +231,8 @@
"NATIVE: test if cond sorta works."
(cond
[(= 1 2) (assert (is true false))]
[(is None None) (setv x true) (assert x)]))
[(is None None) (setv x true) (assert x)])
(assert (= (cond) nil)))
(defn test-index []