chickadee » srfi-145 » assume

(assume OBJ MESSAGE ...)syntax

Evaluates to the value of OBJ if OBJ evaluates to a true value. It is an error if OBJ evaluates to a false value. In this case the error is reported with the remaining MESSAGE arguments and if possible, including the source location of the source of the error.

(assume OBJ MESSAGE ...) expands to (assert OBJ MESSAGE ...). Therefore the assume form may be optimized away if OBJ is guaranteed to evaluate to a true value and is always elided in unsafe mode. For this reason it is not to be used as a replacement for error or type checking, but as a development tool to document assumptions made about code.