def sized
import bend-collections-laws-crypto@1.0.0.0/spec/crypto/blake/blake3.bend as Blake3import Base
282# None when byte_length exceeds the 4 * capacity bytes the array can hold.
283def sized(+length: Nat, pair: Array<U32> & U32) -> Maybe<&1,Array<U32>>:
284 (a,capacity) = pair
285 checked(Nat.is_le(length,Nat.mul(4n,U32.to_nat(capacity))),a,length)