source: node_modules/ramda/src/reduced.js

main
Last change on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 1.0 KB
Line 
1var _curry1 =
2/*#__PURE__*/
3require("./internal/_curry1.js");
4
5var _reduced =
6/*#__PURE__*/
7require("./internal/_reduced.js");
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 * This optimization is available to the below functions:
14 * - [`reduce`](#reduce)
15 * - [`reduceWhile`](#reduceWhile)
16 * - [`reduceBy`](#reduceBy)
17 * - [`reduceRight`](#reduceRight)
18 * - [`transduce`](#transduce)
19 *
20 * @func
21 * @memberOf R
22 * @since v0.15.0
23 * @category List
24 * @sig a -> *
25 * @param {*} x The final value of the reduce.
26 * @return {*} The wrapped value.
27 * @see R.reduce, R.reduceWhile, R.reduceBy, R.reduceRight, R.transduce
28 * @example
29 *
30 * R.reduce(
31 * (acc, item) => item > 3 ? R.reduced(acc) : acc.concat(item),
32 * [],
33 * [1, 2, 3, 4, 5]) // [1, 2, 3]
34 */
35
36
37var reduced =
38/*#__PURE__*/
39_curry1(_reduced);
40
41module.exports = reduced;
Note: See TracBrowser for help on using the repository browser.