def VecT.zip
import bend-tensors@0.0.0.2/bend_tensors.bend as BendTensorsimport Base
514def VecT.zip(~f: F32 -> F32 -> F32, +n: Nat, a: VecT(n), b: VecT(n)) -> VecT(n):
515 match n:
516 case 0n:
517 VecL{x} = a
518 VecL{y} = b
519 VecL{Vec4.zip(~f, x, y)}
520 case 1n+p:
521 VecN{al, ar} = a
522 VecN{bl, br} = b
523 l r = VecT.zip(~f, p, al, bl) VecT.zip(~f, p, ar, br)
524 VecN{l, r}