( expr: Expression, isUnique: (elem: Expression, seen: Expression[]) => boolean )
| 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). |
no test coverage detected