Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
5
Task/Loops-While/OCaml/loops-while-1.ocaml
Normal file
5
Task/Loops-While/OCaml/loops-while-1.ocaml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
let n = ref 1024;;
|
||||
while !n > 0 do
|
||||
Printf.printf "%d\n" !n;
|
||||
n := !n / 2
|
||||
done;;
|
||||
6
Task/Loops-While/OCaml/loops-while-2.ocaml
Normal file
6
Task/Loops-While/OCaml/loops-while-2.ocaml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
let rec loop n =
|
||||
if n > 0 then begin
|
||||
Printf.printf "%d\n" n;
|
||||
loop (n / 2)
|
||||
end
|
||||
in loop 1024
|
||||
Loading…
Add table
Add a link
Reference in a new issue