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

Function intersects

pattern/text/tree.py:75–78  ·  view source on GitHub ↗

Returns True if the given lists have at least one item in common.

(iterable1, iterable2)

Source from the content-addressed store, hash-verified

73 return [x[i] for x in iterable]
74
75def intersects(iterable1, iterable2):
76 """ Returns True if the given lists have at least one item in common.
77 """
78 return find(lambda x: x in iterable1, iterable2) is not None
79
80def unique(iterable):
81 """ Returns a list copy in which each item occurs only once (in-order).

Callers 1

relatedMethod · 0.85

Calls 1

findFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…