UNPKG

944 BJavaScriptView Raw
1var _curry1 =
2/*#__PURE__*/
3require("./internal/_curry1");
4
5var _reduced =
6/*#__PURE__*/
7require("./internal/_reduced");
8/**
9 * Returns a value wrapped to indicate that it is the final value of the reduce
10 * and transduce functions. The returned value should be considered a black
11 * box: the internal structure is not guaranteed to be stable.
12 *
13 * Note: this optimization is only available to the below functions:
14 * - [`reduce`](#reduce)
15 * - [`reduceWhile`](#reduceWhile)
16 * - [`transduce`](#transduce)
17 *
18 * @func
19 * @memberOf R
20 * @since v0.15.0
21 * @category List
22 * @sig a -> *
23 * @param {*} x The final value of the reduce.
24 * @return {*} The wrapped value.
25 * @see R.reduce, R.reduceWhile, R.transduce
26 * @example
27 *
28 * R.reduce(
29 * (acc, item) => item > 3 ? R.reduced(acc) : acc.concat(item),
30 * [],
31 * [1, 2, 3, 4, 5]) // [1, 2, 3]
32 */
33
34
35var reduced =
36/*#__PURE__*/
37_curry1(_reduced);
38
39module.exports = reduced;
\No newline at end of file