Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes vector-cumulate to have same signature as fold
Cumulation is really just accumulating the stepwise results of fold into a single collection (in this case, a vector). It makes more sense to keep the argument order this way (with knil first) as it matches the API for fold / vector-fold, which means one can switch between them as they choose. After talking about this with John Cowan, he also mentioned that the previous argument order (e.g. proc vec knil) is an error and it should have been (vector-cumulate proc knil vec) from the beginning. This should correct the issue in both the code and the main SRFI document.
- Loading branch information