divide.js 638 B

12345678910111213141516171819202122232425262728293031
  1. import _curry2 from "./internal/_curry2.js";
  2. /**
  3. * Divides two numbers. Equivalent to `a / b`.
  4. *
  5. * @func
  6. * @memberOf R
  7. * @since v0.1.0
  8. * @category Math
  9. * @sig Number -> Number -> Number
  10. * @param {Number} a The first value.
  11. * @param {Number} b The second value.
  12. * @return {Number} The result of `a / b`.
  13. * @see R.multiply
  14. * @example
  15. *
  16. * R.divide(71, 100); //=> 0.71
  17. *
  18. * const half = R.divide(R.__, 2);
  19. * half(42); //=> 21
  20. *
  21. * const reciprocal = R.divide(1);
  22. * reciprocal(4); //=> 0.25
  23. */
  24. var divide =
  25. /*#__PURE__*/
  26. _curry2(function divide(a, b) {
  27. return a / b;
  28. });
  29. export default divide;