MCPcopy Index your code
hub / github.com/clips/pattern / find

Function find

pattern/text/search.py:113–118  ·  view source on GitHub ↗

Returns the first item in the list for which function(item) is True, None otherwise.

(function, iterable)

Source from the content-addressed store, hash-verified

111 return [x for x in iterable if x not in seen and not seen.add(x)]
112
113def find(function, iterable):
114 """ Returns the first item in the list for which function(item) is True, None otherwise.
115 """
116 for x in iterable:
117 if function(x) is True:
118 return x
119
120def combinations(iterable, n):
121 # Backwards compatibility.

Callers 3

matchMethod · 0.70
matchMethod · 0.70
_matchMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…