Skip to content
TurtleKitty edited this page May 11, 2019 · 2 revisions

assert

This operator tests a predicate and throws an error if it returns false.

(def x 1)

(assert (+ x 1)) ; true
(assert (- x 1)) ; (runtime-error (assertion-failed (- x 1) "(assert ...) FAIL"))
Clone this wiki locally