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

Function find

pattern/db/__init__.py:56–61  ·  view source on GitHub ↗

Returns the first item in the list for which match(item) is True.

(match=lambda item: False, list=[])

Source from the content-addressed store, hash-verified

54 import pysqlite2.dbapi2 as sqlite
55
56def find(match=lambda item: False, list=[]):
57 """ Returns the first item in the list for which match(item) is True.
58 """
59 for item in list:
60 if match(item) is True:
61 return item
62
63_sum = sum # pattern.db.sum() is also a column aggregate function.
64

Callers 1

cmpFunction · 0.70

Calls 1

matchFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…