(do ..forms) forms: zero or more forms
S
Performs sequential evaluation.
When the do
form is evaluated, each of its forms
are evaluated in order from start to
finish. The final form's result is returned.
Many other forms establish an "implicit do". For example, the body of a function:
(defn example (a)
(called-first)
(called-second)
(produces-result))
With no arguments, (do)
evaluates to #n
. An empty "implicit do" also evaluates to #n
:
(let empty-fn (fn ()))
(prn (empty-fn)) ; prints #n