Closed ryanb closed 9 months ago
Hey Ryan, if you look at the signature for walk
you'll see that it already provides the index
walk : Array2D a, state, WalkOptions *, (state, a, Index -> state) -> state
In many cases where List
has a WithIndex
version I've opted for providing the index by default, since it's commonly helpful in this context. This is probably something where hosting the docs (#1) will make things more clear.
Does that make sense?
@mulias awesome, I missed that. I just looked at the name. Thanks!
I ran into the need for
walkWithIndex
, would you like a PR for this?