Data update
This commit is contained in:
parent
81fd053722
commit
52a6ef48dd
10248 changed files with 63654 additions and 6775 deletions
13
Task/Loops-Do-while/OCaml/loops-do-while-4.ml
Normal file
13
Task/Loops-Do-while/OCaml/loops-do-while-4.ml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
let do_while f p ~init =
|
||||
let rec loop v =
|
||||
let v = f v in
|
||||
if p v then loop v
|
||||
in
|
||||
loop init
|
||||
|
||||
do_while (fun v ->
|
||||
let v = succ v in
|
||||
Printf.printf "%d\n" v;
|
||||
(v))
|
||||
(fun v -> v mod 6 <> 0)
|
||||
~init:0
|
||||
Loading…
Add table
Add a link
Reference in a new issue