Logo

Programming-Idioms

History of Idiom 123 > diff from v17 to v18

Edit summary for version 18 by misha:
New Clojure implementation by user [misha]

Version 17

2019-09-28, 12:22:30

Version 18

2020-04-29, 16:51:23

Idiom #123 Assert condition

Verify that predicate isConsistent returns true, otherwise report assertion violation.
Explain if the assertion is executed even in production environment or not.

Idiom #123 Assert condition

Verify that predicate isConsistent returns true, otherwise report assertion violation.
Explain if the assertion is executed even in production environment or not.

Code
(assert (isConsistent))
Comments bubble
tests for truthy.
for true:
(assert (true? (isConsistent)))
Doc URL
https://clojuredocs.org/clojure.core/assert