(do-for-example & body)
A do
-like construct only compiled if a
variable +examples-enabled+
is bound in the current namespace.
This is used to prepare examples with some variable or function
definitions.
A `do`-like construct only compiled if a variable `+examples-enabled+` is bound in the current namespace. This is used to prepare examples with some variable or function definitions.
(example expr sep val & {:keys [equiv?] :or {equiv? =}})
Show as an example the evaluation of expr
as val
.
Evaluate the example as a test an throw an exception if it fails,
if a variable +examples-enabled+
is set and bound to a truthy value.
Show as an example the evaluation of `expr` as `val`. Evaluate the example as a test an throw an exception if it fails, if a variable `+examples-enabled+` is set and bound to a truthy value.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close