DEV Community

Discussion on: Gets first index of match to condition in List

Collapse
 
egor profile image
Egor Neliuba

There's no need to manually go over the list using mapIndexed. Instead, you should use the built-in indexOfFirst extension function.