Data update
This commit is contained in:
parent
81fd053722
commit
52a6ef48dd
10248 changed files with 63654 additions and 6775 deletions
13
Task/Nested-function/OCaml/nested-function.ml
Normal file
13
Task/Nested-function/OCaml/nested-function.ml
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