def flat
import bend-collections-laws-crypto@1.0.0.0/spec/crypto/random.bend as Randomimport Base
import bend-collections-laws-crypto@1.0.0.0/src/math/u64.bend as W
50# the bytes of consecutive outputs
51def flat(xs: List<&2, W.U64>) -> List<&2, U32>:
52 match xs:
53 case Nil{}:
54 []
55 case Con{x, rest}:
56 append(le_bytes(x), flat(rest))
Uses (5)
Used by (8)
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/random/bytes:bytes
- bend-collections-laws-crypto@1.0.0.0/spec/crypto/random:Random.bytes
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/random/bytes:bytes_lt
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/random/bytes:fill_inv
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/random/bytes:flat_below
- …