Logo

Programming-Idioms

History of Idiom 123 > diff from v19 to v20

Edit summary for version 20 by programming-idioms.org:
[Clojure] 2 ways => 2 impls, see new impl 3981

Version 19

2020-05-03, 21:30:19

Version 20

2020-05-03, 21:31:06

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.

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