Liking cljdoc? Tell your friends :D
All platforms.

nedap.one.api


oneclj/smacro

(one & clauses)

Exactly like #'cond, but on #'*assert*, the following will be checked:

  • No duplicate conditions are contained; and
  • Exactly one condition is truthy.

Helps avoiding sequential semantics, and related ambiguity (is a given cond? intentionally or unintentionally sequential?).

For said checking, all conditions are evaluated eagerly, so they should be side-effect free. Only the truthy condition's 'consequence' will be evaluated, and once.

Exactly like `#'cond`, but on `#'*assert*`, the following will be checked:

* No duplicate conditions are contained; and
* Exactly one condition is truthy.

Helps avoiding sequential semantics, and related ambiguity
(is a given `cond`? intentionally or unintentionally sequential?).

For said checking, all conditions are evaluated eagerly, so they should be side-effect free.
Only the truthy condition's 'consequence' will be evaluated, and once.
source (clj)source (cljs)raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close