def put
import bend-collections-laws-crypto@1.0.0.0/spec/crypto/blake/blake2s.bend as Blake2simport Base
48def put(xs: List<&2,U32>, i: Nat, y: U32) -> List<&2,U32>:
49 match xs i:
50 case Nil{} _: Nil{}
51 case x <> rest 0n: y <> rest
52 case x <> rest 1n+p: x <> put(rest, p, y)