def zip
stelliferous@0.0.2.0 · tensor_band.bend:132
import stelliferous@0.0.2.0/tensor_band.bend as TensorBand
import Base
import stelliferous@0.0.2.0/traversal_partition.bend as Partition
132def zip(~Left: Type,~Right: Type,left: Partition.Tree<&1,Left,Unit>,right: Partition.Tree<&1,Right,Unit>) -> Partition.Tree<&1,Paired<Left,Right>,Unit>:
133 match left right:
134 case Partition.Leaf{left,first,rows,details} Partition.Leaf{right,other_first,other_rows,other_details}:
135 Partition.Leaf{Both{left,right},first,rows,Unit{}}
136 case Partition.Fork{left,right} Partition.Fork{other_left,other_right}:
137 Partition.Fork{zip(~Left,~Right,left,other_left),zip(~Left,~Right,right,other_right)}
138 case left right: only(~Left,~Right,left)