UNPKG

612 BJavaScriptView Raw
1var _curry2 =
2/*#__PURE__*/
3require("./internal/_curry2");
4/**
5 * Takes a value and applies a function to it.
6 *
7 * This function is also known as the `thrush` combinator.
8 *
9 * @func
10 * @memberOf R
11 * @since v0.25.0
12 * @category Function
13 * @sig a -> (a -> b) -> b
14 * @param {*} x The value
15 * @param {Function} f The function to apply
16 * @return {*} The result of applying `f` to `x`
17 * @example
18 *
19 * const t42 = R.applyTo(42);
20 * t42(R.identity); //=> 42
21 * t42(R.add(1)); //=> 43
22 */
23
24
25var applyTo =
26/*#__PURE__*/
27_curry2(function applyTo(x, f) {
28 return f(x);
29});
30
31module.exports = applyTo;
\No newline at end of file