(when-not test & body)
Evaluates test. If logical false, evaluates body in an implicit do.
;; build tuples over sets with the same cardinality
(map
#(when-not (= %2 %3) [%1 %2 %3])
(iterate inc 0) ; a lazy list of indecies
[:a :b :c]
[:a :a :a])
;;=> (nil [1 :b :a] [2 :c :a])
;; See examples for "if" explaining Clojure's idea of logical true
;; and logical false.
;; when-not is similar to unless (in other languages).
;; An alias can be provided with a macro
(defmacro unless [& args] `(when-not ~@args))
(map #(unless (= %2 %3) [%1 %2 %3])
(iterate inc 0) ; a lazy list for indecies
[:a :b :c]
[:a :a :a])
;;=> (nil [1 :b :a] [2 :c :a])