def take
import bend-collections-laws-crypto@1.0.0.0/src/crypto/chacha/chacha20.bend as Chacha20import Base
120def take(n: Nat, xs: List<&2, U32>) -> List<&2, U32>:
121 match n xs:
122 case 0n _: Nil{}
123 case 1n+p Nil{}: Nil{}
124 case 1n+p x <> rest: x <> take(p, rest)
Uses (3)
Used by (9)
- bend-collections-laws-crypto@1.0.0.0/src/crypto/aead/chacha20poly1305:xkey
- bend-collections-laws-crypto@1.0.0.0/src/crypto/chacha/chacha20:xencrypt_unchecked
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/chacha/stream:take_eq
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/aead/chacha20poly1305:xkey_eq
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/chacha/xchacha:xencrypt_correct
- …