In Clojure, nil is considered false for conditional expressions .
As a result, (not x) actually works in exactly the same way as (nil? x) in most cases (with the exception of logical false). eg.
(not "foostring") => false (not nil) => true (not false) ;; false is the only non-nil value that will return true => true
So, to answer your initial question, you can simply do:
(if (and value1 (not value2)) ... ...)
mikera Aug 10 '12 at 3:21 2012-08-10 03:21
source share