Don't qualify iterateBackwards

This commit is contained in:
Richard Feldman 2022-07-22 10:09:15 -04:00 committed by Folkert
parent 5520a82bfe
commit 3991bd31d6
No known key found for this signature in database
GPG Key ID: 1F17F6FFD112B97C

View File

@ -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