def ew1_l
import bendtorch@1.3.0.0/main.bend as Bendtorchimport Base
166# a[t] = f(a[t]) for the n numbers from t; ra holds the array and a[t], already read
167def ew1_l(~f: @+a: F32 -> F32, nleft: Nat, +t: U32, ra: Array<F32> & F32) -> Array<F32>:
168 match nleft ra:
169 case 0n Tuple{a, v}:
170 a
171 case 1n+p Tuple{a, +v}:
172 ew1_l(~f, p, (t + 1 : U32), Array.get(F32, Array.set(F32, a, t, f(v)), (t + 1 : U32)))