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

Function find

pattern/text/en/modality.py:10–15  ·  view source on GitHub ↗

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

(function, list)

Source from the content-addressed store, hash-verified

8### LIST FUNCTIONS #################################################################################
9
10def find(function, list):
11 """ Returns the first item in the list for which function(item) is True, None otherwise.
12 """
13 for item in list:
14 if function(item) == True:
15 return item
16
17### MOOD ###########################################################################################
18

Callers 2

conditionalFunction · 0.70
subjunctiveFunction · 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…