mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 12:18:19 +00:00
Fix naming collision in List.roc
This commit is contained in:
parent
3ea195db12
commit
b2d3db3ce9
1 changed files with 3 additions and 3 deletions
|
@ -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]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue