mirror of
https://github.com/roc-lang/roc.git
synced 2024-11-10 18:08:55 +03:00
Don't qualify iterateBackwards
This commit is contained in:
parent
5520a82bfe
commit
3991bd31d6
@ -802,7 +802,7 @@ findLast = \array, pred ->
|
||||
else
|
||||
Continue {}
|
||||
|
||||
when List.iterateBackwards array {} callback is
|
||||
when iterateBackwards array {} callback is
|
||||
Continue {} -> Err NotFound
|
||||
Break found -> Ok found
|
||||
|
||||
@ -826,7 +826,7 @@ findFirstIndex = \list, matcher ->
|
||||
## If no satisfying element is found, an `Err NotFound` is returned.
|
||||
findLastIndex : List elem, (elem -> Bool) -> Result Nat [NotFound]*
|
||||
findLastIndex = \list, matcher ->
|
||||
foundIndex = List.iterateBackwards list (List.len list - 1) \index, elem ->
|
||||
foundIndex = iterateBackwards list (List.len list - 1) \index, elem ->
|
||||
if matcher elem then
|
||||
Break index
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user