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.
user>(ortruefalsefalse)trueuser>(ortruetruetrue)trueuser>(orfalsefalsefalse)falseuser>(ornilnil)niluser>(orfalsenil)niluser>(ortruenil)true;; or doesn't evaluate if the first value is trueuser>(ortrue(println"foo"))true;; order mattersuser>(or(println"foo")true)footrue;; does not coerce a given value to a boolean true, returns the valueuser>(orfalse42)42user>(orfalse429999)42user>(or429999)42
;; It cares about function's return. Example:;; println returns 'nil', so the next param will be evaluated.(or(println"Clojure")true"Code"false)Clojure;;=>true
;; `or` is a macro, so can't be given where a fn is expected(mapor[truefalse][falsefalse]);; => Syntax error compiling at…;; => Can't take value of a macro: #'clojure.core/or;; wrap in a fn instead(map#(or%1%2)[truefalse][falsefalse]);; => (true false)