def put
import bend-collections-laws-crypto@1.0.0.0/spec/crypto/blake/blake3.bend as Blake3import Base
50def put(xs: List<&2,U32>, i: Nat, +v: U32) -> List<&2,U32>:
51 match xs i:
52 case Nil{} _: Nil{}
53 case Con{x,r} 0n: Con{v,r}
54 case Con{x,r} 1n+j: Con{x,put(r,j,v)}