RosettaCodeData/Task/Loops-Do-while/OCaml/loops-do-while-2.ocaml

8 lines
145 B
Text
Raw Permalink Normal View History

2013-04-10 22:43:41 -07:00
let do_while f p =
let rec loop() =
f();
if p() then loop()
in
loop()
(** val do_while : (unit -> 'a) -> (unit -> bool) -> unit *)