elemIndex package:base

The elemIndex function returns the index of the first element in the given list which is equal (by ==) to the query element, or Nothing if there is no such element. For the result to be Nothing, the list must be finite.
>>> elemIndex 4 [0..]
Just 4