(x: Expression)
| 27 | |
| 28 | if (operator) { |
| 29 | const shouldFlatten = (x: Expression) => |
| 30 | isSymbol(x, 'Nothing') || |
| 31 | x.operator === operator || |
| 32 | x.operator === 'Sequence'; |
| 33 | |
| 34 | // Bypass memory allocation for the common case where there is nothing to flatten |
| 35 | if (xs.every((x) => !shouldFlatten(x))) return xs as T; |