AustinScola / seligimus

A mono-library.
MIT License
1 stars 0 forks source link

Add index #186

Closed AustinScola closed 3 years ago

AustinScola commented 3 years ago

Add an index function for finding the first index of an element in an iterable that matches some predicate.

Note that there is a list.index but it only allows the the equality predicate.

def index(iterable: Iterable, predicate: Callable[...]) -> int:
    ...