On Sat, May 23, 2020, 10:54 AM Rob Cliffe via Python-ideasĀ 
index_of(needle, haystack, key=func)
Sounds like a list comprehension: [ needle for needle in haystack if func(needle) ]

The times it doesn't sound like a list comprehension is when you have a million items in the list, 100k of which match the predicate, but you only care about the first one... Or even just the first ten.

Still, generator comprehension are great. And next() is an excellent function.