/** | |
* Sum of elements in array | |
*/ | |
export function sum(arr: number[]): number { | |
return arr.reduce((a, b) => a + b, 0); | |
} | |
/** | |
* Sum of elements in array | |
*/ | |
export function sum(arr: number[]): number { | |
return arr.reduce((a, b) => a + b, 0); | |
} | |