main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
517 bytes
|
Rev | Line | |
---|
[d24f17c] | 1 | var multiply =
|
---|
| 2 | /*#__PURE__*/
|
---|
| 3 | require("./multiply.js");
|
---|
| 4 |
|
---|
| 5 | var reduce =
|
---|
| 6 | /*#__PURE__*/
|
---|
| 7 | require("./reduce.js");
|
---|
| 8 | /**
|
---|
| 9 | * Multiplies together all the elements of a list.
|
---|
| 10 | *
|
---|
| 11 | * @func
|
---|
| 12 | * @memberOf R
|
---|
| 13 | * @since v0.1.0
|
---|
| 14 | * @category Math
|
---|
| 15 | * @sig [Number] -> Number
|
---|
| 16 | * @param {Array} list An array of numbers
|
---|
| 17 | * @return {Number} The product of all the numbers in the list.
|
---|
| 18 | * @see R.reduce
|
---|
| 19 | * @example
|
---|
| 20 | *
|
---|
| 21 | * R.product([2,4,6,8,100,1]); //=> 38400
|
---|
| 22 | */
|
---|
| 23 |
|
---|
| 24 |
|
---|
| 25 | var product =
|
---|
| 26 | /*#__PURE__*/
|
---|
| 27 | reduce(multiply, 1);
|
---|
| 28 | module.exports = product; |
---|
Note:
See
TracBrowser
for help on using the repository browser.