def Aligned.project_right
bendtorch-core@0.1.0.0 · src/shape/core.bend:277
import bendtorch-core@0.1.0.0/src/shape/core.bend as Core
import Base
277def Aligned.project_right(+left: List<&2, Nat>, +right: List<&2, Nat>, +output: List<&2, Nat>, alignment: Aligned(left, right, output), coordinate: Coordinate(output)) -> Coordinate(right):
278 match left right output:
279 case Nil{} Nil{} Nil{}:
280 Unit{}
281 case +lh <> +lt +rh <> +rt +oh <> +ot:
282 AStep{axis, tail} = alignment
283 CStep{index, rest} = coordinate
284 CStep{Axis.project_right(lh, rh, oh, axis, index), Aligned.project_right(lt, rt, ot, tail, rest)}
285 case Nil{} Nil{} oh <> ot:
286 match alignment:
287 case Nil{} rh <> rt Nil{}:
288 match alignment:
289 case lh <> lt Nil{} Nil{}:
290 match alignment:
291 case Nil{} rh <> rt oh <> ot:
292 match alignment:
293 case lh <> lt Nil{} oh <> ot:
294 match alignment:
295 case lh <> lt rh <> rt Nil{}:
296 match alignment: