You're viewing version 1.2.0 of when-not. The latest stable version of Clojure Core is 1.3.0.
1.2.0 Arrow_down_16x16



  • (when-not test & body)
Evaluates test. If logical false, evaluates body in an implicit do.

2 Examples top

  • user=> (map
             #(when-not (= %2 %3) [%1 %2 %3])
             (iterate inc 0)
             [: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.
Log in to add / edit an example.

See Also top

Log in to add a see also.

Comments top

No comments for when-not. Log in to add a comment.