and

macrosince v0.0-927 clojure.core/andEdit
(and)
(and x)
(and x & next)

Details:

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

(and) returns true.


Examples:

(and)
;;=> true

(and false)
;;=> false

(and true)
;;=> true

(and true true)
;;=> true

(and true false)
;;=> false

(and false false)
;;=> false

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

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

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

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

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

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

See Also:


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