(branch: BaseRoot)
| 676 | |
| 677 | // a narrow of a morph is of its output, so a unit that allows is one it checks |
| 678 | const outputsUnit = (branch: BaseRoot) => { |
| 679 | if (!branch.is("morph")) return false |
| 680 | try { |
| 681 | return branch._out.branches.some(isUnit) |
| 682 | } catch { |
| 683 | // an output that can't be written could be anything |
| 684 | return true |
| 685 | } |
| 686 | } |
| 687 | |
| 688 | type NodeHeld = { |
| 689 | bits: number |