That'd be interesting if (a) lazy and (b) general a la https://dlang.org/library/std/range/recurrence.html. -- Andrei
To be clear, by general you mean to allow functions with more than 2 arguments?
For example if you have:
foo(int i, int j, int k) { return i + j + k; }
then:
scan!foo([1, 2, 3, 4]).array returns [1, 2, 6, 12]
Is "scan" (thanks Timon) telling enough? The python "accumulate"
conflicts with the C++ meaning.
