mirror of
https://github.com/swc-project/swc.git
synced 2024-12-25 22:56:11 +03:00
25 lines
536 B
TypeScript
25 lines
536 B
TypeScript
|
// Loaded from https://deno.land/x/ramda@v0.27.2/source/product.js
|
||
|
|
||
|
|
||
|
import multiply from './multiply.js';
|
||
|
import reduce from './reduce.js';
|
||
|
|
||
|
|
||
|
/**
|
||
|
* 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
|
||
|
*/
|
||
|
var product = reduce(multiply, 1);
|
||
|
export default product;
|