@lucid-softworks/array-scan
v0.1.0
Published
Collect every intermediate value of an array reduction.
Maintainers
Readme
@lucid-softworks/array-scan
Collect every intermediate value of an array reduction.
import { scan } from "@lucid-softworks/array-scan";
scan([1, 2, 3], (sum, value) => sum + value, 0); // [0, 1, 3, 6]See the exported types and tests for exact edge-case behavior.
