ed8e37da62
Per the straw poll in #908, as an alternative to #1147. Now you must use `True`, `False`, and `None`, as in Python. Or just assign `true` to `True`, etc.; the old synonyms aren't reserved words anymore.
9 lines
268 B
Hy
9 lines
268 B
Hy
(defn test-unless []
|
|
"NATIVE: test unless"
|
|
(assert (= (unless False 1) 1))
|
|
(assert (= (unless False 1 2) 2))
|
|
(assert (= (unless False 1 3) 3))
|
|
(assert (= (unless True 2) None))
|
|
(assert (= (unless (!= 1 2) 42) None))
|
|
(assert (= (unless (!= 2 2) 42) 42)))
|