Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
15
Task/Nested-function/Standard-ML/nested-function.ml
Normal file
15
Task/Nested-function/Standard-ML/nested-function.ml
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
fun make_list separator =
|
||||
let
|
||||
val counter = ref 1;
|
||||
fun make_item item =
|
||||
let
|
||||
val result = Int.toString (!counter) ^ separator ^ item ^ "\n"
|
||||
in
|
||||
counter := !counter + 1;
|
||||
result
|
||||
end
|
||||
in
|
||||
make_item "first" ^ make_item "second" ^ make_item "third"
|
||||
end;
|
||||
|
||||
print (make_list ". ")
|
||||
Loading…
Add table
Add a link
Reference in a new issue