def remove
import bendtorch@1.3.0.0/tensor.bend as Tensorimport Base
42# s without axis k (s itself past the last axis)
43def remove(s: List<&2, Nat>, k: Nat) -> List<&2, Nat>:
44 match s k:
45 case Nil{} _:
46 Nil{}
47 case Con{h, t} 0n:
48 t
49 case Con{h, t} 1n+p:
50 h <> remove(t, p)