fork(3) download
  1. (def atom?
  2. (fn [a]
  3. (not (seq? a))))
  4.  
  5. (println "(atom? 'a) = " (atom? 'a))
  6. (println "(atom? '(a)) = " (atom? '(a)))
  7. (println "")
  8.  
  9. (def null?
  10. (fn [a]
  11. (or
  12. (nil? a)
  13. (= () a))))
  14.  
  15. (println "(null? nil) = " (null? nil))
  16. (println "(null? 'a) = " (null? 'a))
  17. (println "(null? '(a)) = " (null? '(a)))
  18. (println "(null? '()) = " (null? '()))
  19.  
  20.  
Success #stdin #stdout 1.53s 389120KB
stdin
Standard input is empty
stdout
(atom? 'a) =  true
(atom? '(a)) =  false

(null? nil) =  true
(null? 'a) =   false
(null? '(a)) =  false
(null? '()) =  true