Fix naming collision in List.roc

This commit is contained in:
Richard Feldman 2023-08-15 02:26:34 -04:00
parent 3ea195db12
commit b2d3db3ce9
No known key found for this signature in database
GPG key ID: F1F21AA5B1D9E43B

View file

@ -532,10 +532,10 @@ walkBackwardsUntil = \list, initial, func ->
## Walks to the end of the list from a specified starting index
walkFrom : List elem, Nat, state, (state, elem -> state) -> state
walkFrom = \list, index, state, func ->
walkHelp : _, _ -> [Continue _, Break []]
walkHelp = \currentState, element -> Continue (func currentState element)
step : _, _ -> [Continue _, Break []]
step = \currentState, element -> Continue (func currentState element)
when List.iterHelp list state walkHelp index (List.len list) is
when List.iterHelp list state step index (List.len list) is
Continue new -> new
## A combination of [List.walkFrom] and [List.walkUntil]