Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
6
Task/Catamorphism/OCaml/catamorphism.ocaml
Normal file
6
Task/Catamorphism/OCaml/catamorphism.ocaml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
# let nums = [1;2;3;4;5;6;7;8;9;10];;
|
||||
val nums : int list = [1; 2; 3; 4; 5; 6; 7; 8; 9; 10]
|
||||
# let sum = List.fold_left (+) 0 nums;;
|
||||
val sum : int = 55
|
||||
# let product = List.fold_left ( * ) 1 nums;;
|
||||
val product : int = 3628800
|
||||
Loading…
Add table
Add a link
Reference in a new issue