How to use the multiply function from ramda

Find comprehensive JavaScript ramda.multiply code examples handpicked from public code repositorys.

14
15
16
17
18
19
20
21
22
23
24
  square
)
*/
//log(operate(3, 4))


const square = x => R.multiply(x, x)
const opt = pipe(
  multiply,
  inc,
  square
fork icon2
star icon5
watch icon0

67
68
69
70
71
72
73
74
75
76
77
78
79


const default4 =
    defaultValue(4)


const doMath =
    B(add(10), multiply(5))


const doMath2 =
    E(add, 10, multiply, 5)

fork icon0
star icon1
watch icon0

7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
 *
 *      const double = R.multiply(2);
 *      const triple = R.multiply(3);
 *      double(3);       //=>  6
 *      triple(4);       //=> 12
 *      R.multiply(2, 5);  //=> 10
 */




var multiply = /*#__PURE__*/_curry2(function multiply(a, b) {
fork icon0
star icon0
watch icon0

+ 7 other calls in file

2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
* @param {Number} b The second value.
* @return {Number} The result of `a * b`.
* @see R.divide
* @example
*
*      var double = R.multiply(2);
*      var triple = R.multiply(3);
*      double(3);       //=>  6
*      triple(4);       //=> 12
*      R.multiply(2, 5);  //=> 10
fork icon0
star icon0
watch icon1

+ 75 other calls in file

46
47
48
49
50
51
52
53
54
55
56
57
58
  const verticalSplits = splits(y, column(forest, x))


  const horizontalScores = rowScores(tree, horizontalSplits)
  const verticalScores = rowScores(tree, verticalSplits)


  return R.multiply(horizontalScores, verticalScores)
})


const part1 = R.compose(
  R.length,
fork icon0
star icon0
watch icon0

+ 5 other calls in file

1
2
3
4
5
6
7
8
9
10
11
12
13


const __ = R.__;


// addIndex: https://ramdajs.com/docs/#addIndex
console.log('\n=== addIndex ===');
const double = R.multiply(2);
console.log(R.map(double, [5, 10, 15, 20, 25]));


const doublePlusIndex = (v, i) => double(v) + i;
const indexedMap = R.addIndex(R.map);
fork icon0
star icon0
watch icon0

+ 2 other calls in file

Other functions in ramda

Sorted by popularity

function icon

ramda.clone is the most popular function in ramda (30311 examples)