Only true is true

less than 1 minute read

Code

;; true.clj

(true? true)
(true? false)
(true? 0)
(true? 1)
(false? 1)
(false? false)
(false? 0)
(number? 1)
(= 1 1)
(empty? [])
(empty? nil)
;; (empty? 1) ; throws exception
(nil? nil)
(nil? 1)
(zero? 0)
;; (zero? nil) ; throws exception
;; (zero? "278") ; throws exception
;; (one? 1) ; throws exception
;; (one? "1") ; throws exception

Notes

Updated: