diff --git a/tests/mbt/model/libraries/extraSpells.qnt b/tests/mbt/model/libraries/extraSpells.qnt index 0e45a26332..97855f1568 100644 --- a/tests/mbt/model/libraries/extraSpells.qnt +++ b/tests/mbt/model/libraries/extraSpells.qnt @@ -257,7 +257,7 @@ module extraSpells { /// Returns: /// - The index of the first element that satisfies the predicate function, or -1 if no such element exists. pure def firstIndex(__list: List[a], __f: a => bool): int = { - range(0, __list.length()).foldl( + __list.indices().fold( -1, (acc, i) => if (acc == -1 and __f(__list[i])) i else acc ) @@ -297,4 +297,4 @@ module extraSpells { assert(splitAfterFirst(List(), __x => __x > 0) == (List(), List())), } -} \ No newline at end of file +}