Skip to content

clojure.core/if

View this page on ClojureDocs

Type: var Added: Clojure unknown Examples: 3 Runnable: 2
()

Evaluates test.

Examples

by Victor on
by jafingerhut on . May have evaluation errors.
by agodde on

Note by kimtg

user=> (doc if)
-------------------------
if
  (if test then else?)
Special Form
  Evaluates test. If not the singular values nil or false,
  evaluates and yields then, otherwise, evaluates and yields else. If
  else is not supplied it defaults to nil.

  Please see http://clojure.org/special_forms#if
http://clojure.org/special_forms#if

See also


Content from the matching ClojureDocs page, with authors credited on each contribution.