def Aligned.project_left
bendtorch-core@0.1.0.0 · src/shape/core.bend:256
import bendtorch-core@0.1.0.0/src/shape/core.bend as Core
import Base
256def Aligned.project_left(+left: List<&2, Nat>, +right: List<&2, Nat>, +output: List<&2, Nat>, alignment: Aligned(left, right, output), coordinate: Coordinate(output)) -> Coordinate(left):
257 match left right output:
258 case Nil{} Nil{} Nil{}:
259 Unit{}
260 case +lh <> +lt +rh <> +rt +oh <> +ot:
261 AStep{axis, tail} = alignment
262 CStep{index, rest} = coordinate
263 CStep{Axis.project_left(lh, rh, oh, axis, index), Aligned.project_left(lt, rt, ot, tail, rest)}
264 case Nil{} Nil{} oh <> ot:
265 match alignment:
266 case Nil{} rh <> rt Nil{}:
267 match alignment:
268 case lh <> lt Nil{} Nil{}:
269 match alignment:
270 case Nil{} rh <> rt oh <> ot:
271 match alignment:
272 case lh <> lt Nil{} oh <> ot:
273 match alignment:
274 case lh <> lt rh <> rt Nil{}:
275 match alignment: