1
1
mirror of https://github.com/kanaka/mal.git synced 2024-08-16 17:20:23 +03:00

step 4: Test (if nil 1) returns nil

Certain implementations like the one I wrote can get this wrong.
This commit is contained in:
Aasim Kandrikar 2019-08-07 12:55:44 +05:30
parent e4171bf638
commit 57ccbb5e47

View File

@ -50,6 +50,8 @@
;; Testing 1-way if form
(if false (+ 1 7))
;=>nil
(if nil 8)
;=>nil
(if nil 8 7)
;=>7
(if true (+ 1 7))