def VecT.map
import bend-tensors@0.0.0.2/bend_tensors.bend as BendTensorsimport Base
504def VecT.map(~f: F32 -> F32, +n: Nat, v: VecT(n)) -> VecT(n):
505 match n:
506 case 0n:
507 VecL{x} = v
508 VecL{Vec4.map(~f, x)}
509 case 1n+p:
510 VecN{l, r} = v
511 a b = VecT.map(~f, p, l) VecT.map(~f, p, r)
512 VecN{a, b}