You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
448 B

4 years ago
  1. import _curry2 from "./internal/_curry2.js";
  2. /**
  3. * Returns the smaller of its two arguments.
  4. *
  5. * @func
  6. * @memberOf R
  7. * @since v0.1.0
  8. * @category Relation
  9. * @sig Ord a => a -> a -> a
  10. * @param {*} a
  11. * @param {*} b
  12. * @return {*}
  13. * @see R.minBy, R.max
  14. * @example
  15. *
  16. * R.min(789, 123); //=> 123
  17. * R.min('a', 'b'); //=> 'a'
  18. */
  19. var min =
  20. /*#__PURE__*/
  21. _curry2(function min(a, b) {
  22. return b < a ? b : a;
  23. });
  24. export default min;