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:
479 bytes
|
Line | |
---|
1 | import multiply from "./multiply.js";
|
---|
2 | import reduce from "./reduce.js";
|
---|
3 | /**
|
---|
4 | * Multiplies together all the elements of a list.
|
---|
5 | *
|
---|
6 | * @func
|
---|
7 | * @memberOf R
|
---|
8 | * @since v0.1.0
|
---|
9 | * @category Math
|
---|
10 | * @sig [Number] -> Number
|
---|
11 | * @param {Array} list An array of numbers
|
---|
12 | * @return {Number} The product of all the numbers in the list.
|
---|
13 | * @see R.reduce
|
---|
14 | * @example
|
---|
15 | *
|
---|
16 | * R.product([2,4,6,8,100,1]); //=> 38400
|
---|
17 | */
|
---|
18 |
|
---|
19 | var product =
|
---|
20 | /*#__PURE__*/
|
---|
21 | reduce(multiply, 1);
|
---|
22 | export default product; |
---|
Note:
See
TracBrowser
for help on using the repository browser.