2.9.41 • Published 4 years ago

@extra-array/accumulate-update v2.9.41

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

Produces accumulating values. :running: :package: :ledger:

Alternatives: accumulate, accumulate$. Similar: map, filter, reduce, accumulate. This is part of package extra-array.

array.accumulate$(x, fn, [acc]);
// x:   an array (updated)
// fn:  reduce function (acc, v, i, x)
// acc: initial value
// --> x
const array = require('extra-array');

var x = [1, 2, 3, 4];
array.accumulate$(x, (acc, v) => acc+v);
// [ 1, 3, 6, 10 ]

x;
// [ 1, 3, 6, 10 ]

var x = [1, 2, 3, 4];
array.accumulate$(x, (acc, v) => acc+v, 100);
// [ 101, 103, 106, 110 ]

references

2.9.41

4 years ago

2.9.40

4 years ago

2.9.38

4 years ago

2.9.39

4 years ago

2.9.37

4 years ago

2.9.36

4 years ago

2.9.12

4 years ago

2.9.11

4 years ago

2.9.10

4 years ago

2.9.9

4 years ago

2.9.8

4 years ago

2.9.7

4 years ago

2.9.6

4 years ago

2.9.5

4 years ago

2.9.4

4 years ago

2.9.3

4 years ago

2.9.2

4 years ago

2.9.1

4 years ago

2.9.0

4 years ago

2.8.76

4 years ago

2.8.74

4 years ago

2.8.75

4 years ago

2.8.70

4 years ago

2.8.73

4 years ago

2.8.72

4 years ago

2.8.71

4 years ago

2.8.69

4 years ago

2.8.67

4 years ago

2.8.66

4 years ago

2.8.45

4 years ago

2.8.44

4 years ago

2.8.49

4 years ago

2.8.48

4 years ago

2.8.47

4 years ago

2.8.46

4 years ago

2.8.52

4 years ago

2.8.51

4 years ago

2.8.50

4 years ago

2.8.56

4 years ago

2.8.55

4 years ago

2.8.54

4 years ago

2.8.53

4 years ago

2.8.59

4 years ago

2.8.58

4 years ago

2.8.57

4 years ago

2.8.63

4 years ago

2.8.62

4 years ago

2.8.61

4 years ago

2.8.60

4 years ago

2.8.65

4 years ago

2.8.64

4 years ago

2.8.43

4 years ago

2.8.42

4 years ago

2.8.41

4 years ago

2.8.40

4 years ago

2.8.39

4 years ago

2.8.38

4 years ago

2.8.37

4 years ago

2.8.36

4 years ago

2.8.35

4 years ago

2.8.34

4 years ago

2.8.33

4 years ago

2.8.30

4 years ago

2.8.32

4 years ago

2.8.31

4 years ago

2.8.29

4 years ago

2.8.28

4 years ago

2.8.27

4 years ago

2.8.26

4 years ago

2.8.25

4 years ago

2.8.23

4 years ago

2.8.22

4 years ago

2.8.21

4 years ago

2.8.20

4 years ago

2.8.19

4 years ago

2.8.18

4 years ago

2.8.17

4 years ago

2.8.16

4 years ago

2.8.15

4 years ago

2.8.14

4 years ago

2.8.13

4 years ago

2.8.12

4 years ago