( from: nodeOfKind<RootKind>, to: nodeOfKind<RootKind>, ctx: IntersectionContext )
| 225 | : _intersectNodes(l, r, ctx) |
| 226 | |
| 227 | const pipeMorphed = ( |
| 228 | from: nodeOfKind<RootKind>, |
| 229 | to: nodeOfKind<RootKind>, |
| 230 | ctx: IntersectionContext |
| 231 | ) => |
| 232 | from.distribute( |
| 233 | fromBranch => _pipeMorphed(fromBranch, to, ctx), |
| 234 | results => { |
| 235 | const viableBranches = results.filter( |
| 236 | isNode as TypeGuard<unknown, Morph.Node> |
| 237 | ) |
| 238 | |
| 239 | return viableBranches.length === 0 ? |
| 240 | Disjoint.init("union", from.branches, to.branches) |
| 241 | : ctx.$.node("union", { branches: viableBranches }) |
| 242 | } |
| 243 | ) |
| 244 | |
| 245 | const _pipeMorphed = ( |
| 246 | from: Union.ChildNode, |
no test coverage detected