Sum and product of an array: Difference between revisions

→‎Lists: Typofix
m (Highlighting, whitespace)
(→‎Lists: Typofix)
Line 735:
Array.foldl op* 1.0 a;</lang>
===Lists===
<lang ocaml>(* ints *)
val x = [1, 2, 3, 4, 5];
foldl op+ 0 x;
Anonymous user