RosettaCodeData/Task/Assertions/E/assertions.e

6 lines
211 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
require(a == 42) # default message, "Required condition failed"
require(a == 42, "The Answer is Wrong.") # supplied message
require(a == 42, fn { `Off by ${a - 42}.` }) # computed only on failure