lib/accumulator.js
function $sum(params) {
    if (Array.isArray(params) && params.every(p => typeof p === 'number')) {
        return params.reduce((t, n) => t + n, 0);
    }
    throw new Error('$sum expects an array of number');
}
function $sum(params) {
    if (Array.isArray(params) && params.every(p => typeof p === 'number')) {
        return params.reduce((t, n) => t + n, 0);
    }
    throw new Error('$sum expects an array of number');
}
function $sum ( params ) { if ( Array . isArray ( params ) && params . every ( p => typeof p === 'number' ) ) { return params . reduce ( ( t , n ) => t + n , 0 ) ; } throw new Error ( '$sum expects an array of number' ) ; }
Sum the numbers in the array

@param {number[]} params
@returns {number}
Sum the numbers in the array