mirror of https://github.com/lukechilds/docs.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
446 B
20 lines
446 B
var multiply = require('./multiply');
|
|
var reduce = require('./reduce');
|
|
|
|
|
|
/**
|
|
* Multiplies together all the elements of a list.
|
|
*
|
|
* @func
|
|
* @memberOf R
|
|
* @since v0.1.0
|
|
* @category Math
|
|
* @sig [Number] -> Number
|
|
* @param {Array} list An array of numbers
|
|
* @return {Number} The product of all the numbers in the list.
|
|
* @see R.reduce
|
|
* @example
|
|
*
|
|
* R.product([2,4,6,8,100,1]); //=> 38400
|
|
*/
|
|
module.exports = reduce(multiply, 1);
|
|
|