reduced

v0.9.6arrow_drop_down
v0.9.6
STATUS
Passing
DOWNLOADS
2
VISIBILITY
Public
PUBLISHED
5 years ago
SIZE
745 B
Returns a value wrapped to indicate that it is the final value of the reduce and transduce functions.
1 contributor
Install reduced as a package?
Copied
npm i @bit/justin-capalbo.ramda.reduced
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.cloud
Component Example
React
React
Vue
Angular
React Native
Add dependency... help_outline
Just
import
any of the 1 million components
and packages in Bit or NPM to the example.
import Button from '@bit/grommet.grommet.button';
import Lodash from 'lodash';
toggle layout
No preview available
modifieddraft
chevron_left
chevron_right
reduced (
x:*
) : *

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:

Example
R.reduce(
      (acc, item) => item > 3 ? R.reduced(acc) : acc.concat(item),
      [],
      [1, 2, 3, 4, 5]) // [1, 2, 3]
Argument
x: *

The final value of the reduce.

Returns
*

The wrapped value.

Help and resources