def pad
import bend-collections-laws-crypto@1.0.0.0/spec/crypto/blake/blake2s.bend as Blake2simport Base
135def pad(bytes: List<&2,U32>, +i: Nat, +length: Nat) -> List<&2,U32>:
136 match bytes:
137 case Nil{}: Nil{}
138 case b <> rest: keep_if(Nat.is_lt(i, length), b) <> pad(rest, 1n+i, length)