or

macrosince v0.0-927 clojure.core/orEdit
(or)
(or x)
(or x & next)

Details:

Evaluates arguments one at a time from left to right. If an argument returns logical true, or returns that value and doesn't evaluate any of the other arguments, otherwise it returns the value of the last argument.

(or) returns nil.


Examples:

(or)
;;=> nil

(or false)
;;=> false

(or true)
;;=> true

(or true true)
;;=> true

(or true false)
;;=> true

(or false false)
;;=> false

nil and false are the only falsy values and everything else is truthy:

(or "foo" "bar")
;;=> "bar"

(or "foo" nil)
;;=> "foo"

(or "foo" false)
;;=> "foo"

(or nil "foo")
;;=> "foo"

(or false "foo")
;;=> "foo"

See Also:


Source docstring:
Evaluates exprs one at a time, from left to right. If a form
returns a logical true value, or returns that value and doesn't
evaluate any of the other expressions, otherwise it returns the
value of the last expression. (or) returns nil.
Source code @ clojurescript:src/main/clojure/cljs/core.cljc
(core/defmacro or
  ([] nil)
  ([x] x)
  ([x & next]
   `(let [or# ~x]
      (if or# or# (or ~@next)))))