Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
13
Task/Nested-function/OCaml/nested-function.ocaml
Normal file
13
Task/Nested-function/OCaml/nested-function.ocaml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
let make_list separator =
|
||||
let counter = ref 1 in
|
||||
|
||||
let make_item item =
|
||||
let result = string_of_int !counter ^ separator ^ item ^ "\n" in
|
||||
incr counter;
|
||||
result
|
||||
in
|
||||
|
||||
make_item "first" ^ make_item "second" ^ make_item "third"
|
||||
|
||||
let () =
|
||||
print_string (make_list ". ")
|
||||
Loading…
Add table
Add a link
Reference in a new issue