Bendtorch.lw: def of bendtorch@1.3.0.0 Import: import bendtorch@1.3.0.0/main.bend as Bendtorch Lines 1461-1467 of bendtorch@1.3.0.0/main.bend: https://jend.leeeet.dev/read.txt?path=bendtorch@1.3.0.0/main.bend&start_line=1461&end_line=1467 import Base # a[j] = (a[j] - m) - l for j = idx..idx + k def lw(k: Nat, +idx: U32, +m: F32, +l: F32, r: Array & F32) -> Array: match k r: case 0n Tuple{a, +x}: Array.set(F32, a, idx, ((x - m : F32) - l : F32)) case 1n+q Tuple{a, +x}: lw(q, (idx + 1 : U32), m, l, Array.get(F32, Array.set(F32, a, idx, ((x - m : F32) - l : F32)), (idx + 1 : U32))) Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array.get https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array.set https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.sub https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.add