(b: MathJSON)
| 226 | if (typeof b === 'string') return INFINITE_BOUNDS.has(b); |
| 227 | if (Array.isArray(b) && b[0] === 'Negate') return isInfiniteBound(b[1]); |
| 228 | return false; |
| 229 | } |
| 230 | |
| 231 | function flattenAnd(a: MathJSON): MathJSON[] { |
| 232 | if (a === null || a === undefined) return []; |
| 233 | if (Array.isArray(a) && a[0] === 'And') |
| 234 | return a.slice(1).flatMap((x) => flattenAnd(x)); |
| 235 | return [a]; |
no test coverage detected