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

Function complexIterator

src/compute-engine/library/sets.ts:1439–1454  ·  view source on GitHub ↗
(
  self: Expression
)

Source from the content-addressed store, hash-verified

1437 const typeName = sym(collection);
1438 if (typeName) {
1439 // 3. Type-style membership, e.g. Element(x, finite_real)
1440 try {
1441 const type = ce.type(typeName);
1442 if (!type.isUnknown) {
1443 // Three-valued: in particular, a concrete number literal whose type
1444 // overlaps but does not match is definitively excluded (e.g.
1445 // `Element(2.5, integer)` → False, even though
1446 // `finite_rational ∩ integer` is non-empty), while a symbol of
1447 // overlapping type stays indeterminate (falls through).
1448 const r = typeMembership(x, type.type);
1449 if (r !== undefined) return r;
1450 }
1451 } catch {
1452 // If type parsing fails (e.g., "Booleans" is not a valid type),
1453 // fall through
1454 }
1455
1456 // 4. Primitive number-set symbols map to types (query-side mirror of
1457 // the assume-side refinement)

Callers

nothing calls this directly

Calls 3

numberMethod · 0.65
nextMethod · 0.45

Tested by

no test coverage detected