when

macrosince v0.0-927imported clojure.core/whenEdit
(when test & body)

Details:

Evaluates test. If logical true, evaluates body in an implicit do.

when is often used instead of if for conditions that do not have an "else".


See Also:


Source docstring:
Evaluates test. If logical true, evaluates body in an implicit do.
Source code @ clojure:src/clj/clojure/core.clj
(defmacro when
  {:added "1.0"}
  [test & body]
  (list 'if test (cons 'do body)))