RosettaCodeData/Task/Loops-Do-while/OCaml/loops-do-while-2.ocaml
2023-07-01 13:44:08 -04:00

7 lines
145 B
Text

let do_while f p =
let rec loop() =
f();
if p() then loop()
in
loop()
(** val do_while : (unit -> 'a) -> (unit -> bool) -> unit *)