Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

27 rindas
595 B

pirms 4 gadiem
  1. import _curry2 from "./internal/_curry2.js";
  2. /**
  3. * Takes a value and applies a function to it.
  4. *
  5. * This function is also known as the `thrush` combinator.
  6. *
  7. * @func
  8. * @memberOf R
  9. * @since v0.25.0
  10. * @category Function
  11. * @sig a -> (a -> b) -> b
  12. * @param {*} x The value
  13. * @param {Function} f The function to apply
  14. * @return {*} The result of applying `f` to `x`
  15. * @example
  16. *
  17. * const t42 = R.applyTo(42);
  18. * t42(R.identity); //=> 42
  19. * t42(R.add(1)); //=> 43
  20. */
  21. var applyTo =
  22. /*#__PURE__*/
  23. _curry2(function applyTo(x, f) {
  24. return f(x);
  25. });
  26. export default applyTo;