RosettaCodeData/Task/Assertions/OCaml/assertions.ocaml

4 lines
144 B
Text
Raw Permalink Normal View History

2013-04-10 22:43:41 -07:00
let a = get_some_value () in
assert (a = 42); (* throws Assert_failure when a is not 42 *)
(* evaluate stuff to return here when a is 42 *)