How to use the divide function from ramda

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

1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
 *      R.divide(71, 100); //=> 0.71
 *
 *      var half = R.divide(R.__, 2);
 *      half(42); //=> 21
 *
 *      var reciprocal = R.divide(1);
 *      reciprocal(4);   //=> 0.25
 */
var divide = _curry2(function divide(a, b) {
    return a / b;
fork icon0
star icon0
watch icon0

+ 71 other calls in file

2650
2651
2652
2653
2654
2655
2656
2657
2658
*      R.divide(71, 100); //=> 0.71
*
*      const half = R.divide(R.__, 2);
*      half(42); //=> 21
*
*      const reciprocal = R.divide(1);
*      reciprocal(4);   //=> 0.25
*/

fork icon0
star icon0
watch icon2

+ 15 other calls in file

62
63
64
65
66
67
68
69
70
71

const operationMap = {
  '*': R.multiply,
  '+': R.add,
  '-': R.subtract,
  '/': R.divide
}

const applyOperation = (worry, operation) => {
  const opFn = operationMap[operation.op]
fork icon0
star icon0
watch icon0

Other functions in ramda

Sorted by popularity

function icon

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