Task

Compute the sum and product of an array of integers.




let a => import 'arrays';
let s => import 'stream';
 
let sum array => a.stream array -> s.reduce 0 +;
let prod array => a.stream prod -> s.reduce 1 *;