/array/sum
stdSums the given array of numbers.
Type signature
(xs: number[]) => number
Examples
sum([1, 2, 3, 4, 5]);
// ⇒ 15
Try in REPL
Questions
- How to sum elements of an array?
(xs: number[]) => number
sum([1, 2, 3, 4, 5]);
// ⇒ 15
Try in REPL