immutable-array.reduce
v0.1.0
Published
returns a value by applying iterator function over accumulator and each element of immutable array. The accumulator starts with the initialValue.
Downloads
3
Readme
immutable-array.reduce
immutable-array.reduce
returns a value by applying iterator function over accumulator and each element of immutable. The accumulator starts with the initialValue
Install
$ npm install immutable-array.reduce --save
Usage
const ImmutableArray = {
of: require('immutable-array.of'),
reduce: require('immutable-array.reduce')
}
const a = ImmutableArray.of([1, 2, 3, 4, 5]) // {array: [1, 2, 3, 4, 5], length: 5}
const b = ImmutableArray.reduce((a, b) => a + b, 0) // 15
Other related libraries
Support
- Node.js >=6
- ES2015 transpilers
License
MIT