MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / countMatchingUnion

Function countMatchingUnion

src/compute-engine/library/sets.ts:1576–1591  ·  view source on GitHub ↗
(
  expr: Expression,
  isUnique: (elem: Expression, seen: Expression[]) => boolean
)

Source from the content-addressed store, hash-verified

1574 isFinite: (expr) => {
1575 if (!isFunction(expr)) return undefined;
1576 if (expr.ops[0]?.isFiniteCollection === true) return true;
1577 const count = differenceCount(expr, memberOf);
1578 return count === undefined ? undefined : Number.isFinite(count);
1579 },
1580
1581 iterator: complementIterator,
1582 },
1583 },
1584
1585 Intersection: {
1586 examples: ['Intersection(Set(1, 2, 3), Set(2, 3, 4))'],
1587 // notation: \cap
1588 // Accepts any finite collection operand (e.g. a `List`), not just sets:
1589 // list operands are coerced to a set (deduped) by `intersection`, so
1590 // `Intersection([1,2,3], [2,3,4])` works without building sets by hand.
1591 wikidata: 'Q185837',
1592 // An absent collection operand (`Missing`, or a restricted set whose
1593 // condition is false) makes the result `Missing`, as a collection
1594 // operator over an absent collection does (user decision 2026-09-26).

Callers 1

sets.tsFile · 0.85

Calls 2

isFunctionFunction · 0.90
eachMethod · 0.65

Tested by

no test coverage detected