store/[org.clojure/clojure "1.8.0"] clj::clojure.core/when-not

Official Documentation

Add notes
Arities
==================================================
   [test & body]

Docstring
==================================================
  Evaluates test. If logical false, evaluates body in an implicit do.

Source

(defmacro when-not
  "Evaluates test. If logical false, evaluates body in an implicit do."
  {:added "1.0"}
  [test & body]
    (list 'if test nil (cons 'do body)))

Example 1

Edit
;; See examples for "if" explaining Clojure's idea of logical true
;; and logical false.

Example 2

Edit
(map #(when-not (= %2 %3) [%1 %2 %3])
     (iterate inc 0)
     [:a :b :c]
     [:a :a :a])
;; => (nil [1 :b :a] [2 :c :a])

Uses on crossclj