mirror of
https://github.com/swc-project/swc.git
synced 2024-12-24 22:22:34 +03:00
bbaf619f63
swc_bundler: - [x] Fix wrapped esms. (denoland/deno#9307) - [x] Make test secure.
34 lines
967 B
TypeScript
34 lines
967 B
TypeScript
// Loaded from https://deno.land/x/ramda@v0.27.2/source/reduced.js
|
|
|
|
|
|
import _curry1 from './internal/_curry1.js';
|
|
import _reduced from './internal/_reduced.js';
|
|
|
|
/**
|
|
* Returns a value wrapped to indicate that it is the final value of the reduce
|
|
* and transduce functions. The returned value should be considered a black
|
|
* box: the internal structure is not guaranteed to be stable.
|
|
*
|
|
* Note: this optimization is only available to the below functions:
|
|
* - [`reduce`](#reduce)
|
|
* - [`reduceWhile`](#reduceWhile)
|
|
* - [`transduce`](#transduce)
|
|
*
|
|
* @func
|
|
* @memberOf R
|
|
* @since v0.15.0
|
|
* @category List
|
|
* @sig a -> *
|
|
* @param {*} x The final value of the reduce.
|
|
* @return {*} The wrapped value.
|
|
* @see R.reduce, R.reduceWhile, R.transduce
|
|
* @example
|
|
*
|
|
* R.reduce(
|
|
* (acc, item) => item > 3 ? R.reduced(acc) : acc.concat(item),
|
|
* [],
|
|
* [1, 2, 3, 4, 5]) // [1, 2, 3]
|
|
*/
|
|
var reduced = _curry1(_reduced);
|
|
export default reduced;
|