Closed sporto closed 2 years ago
I believe you're looking for foldLeft? See the foldable interface: http://emmanueltouzery.github.io/prelude.ts/latest/apidoc/interfaces/foldable.html
closing for now, I believe I answered. If that's not the case, please reopen.
Yes, it seems so, thanks
Vector.fold
and similar have a signature like:Many times you want to fold into a different type This is common in FP langs. e.g. https://package.elm-lang.org/packages/elm/core/latest/List#foldl
I'm missing an alternative function?
Consider changing this to something like, where the accumulator can be something different.