def setd
import bendtorch@1.3.0.0/tensor.bend as Tensorimport Base
293# s with the size of axis k replaced by v (s itself past the last axis)
294def setd(s: List<&2, Nat>, k: Nat, +v: Nat) -> List<&2, Nat>:
295 match s k:
296 case Nil{} _:
297 Nil{}
298 case Con{h, t} 0n:
299 v <> t
300 case Con{h, t} 1n+p:
301 h <> setd(t, p, v)