Sum of Array: Difference between revisions
Content deleted Content added
→[[Haskell]]: better style |
OCaml solution |
||
Line 223:
for(var i in array)
sum += array[i];
== [[OCaml]] ==
[[Category:OCaml]]
let a = [| 1; 2; 3; 4; 5 |] in
Array.fold_left (+) 0 a
==[[Perl]]==
|