@extra-array/accumulate.min
TypeScript icon, indicating that this package has built-in type declarations

2.10.19 • Public • Published

Produces accumulating values. 📦 😺 🏃 📼 🌔 📜 📰 📘

Similar: map, filter, reject, reduce, accumulate.

This is part of package extra-array.

This is browserified, minified version of @extra-array/accumulate.
It is exported as global variable array_accumulate.
CDN: unpkg, jsDelivr.


array.accumulate(x, fr, [acc]);
// x:   an array
// fr:  reduce function (acc, v, i, x)
// acc: initial value
const array = require("extra-array");

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

array.accumulate(x, (acc, v) => acc+v, 100);
// [ 101, 103, 106, 110 ]


References

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i @extra-array/accumulate.min

      Weekly Downloads

      1

      Version

      2.10.19

      License

      MIT

      Unpacked Size

      5.58 kB

      Total Files

      8

      Last publish

      Collaborators

      • wolfram77