def take
import bend-collections-laws-crypto@1.0.0.0/spec/crypto/random.bend as Randomimport Base
58def take(n: Nat, xs: List<&2, U32>) -> List<&2, U32>:
59 match n xs:
60 case 0n _:
61 []
62 case 1n+p Nil{}:
63 []
64 case 1n+p Con{x, rest}:
65 Con{x, take(p, rest)}
Uses (3)
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:below_take
- 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
- …