def get
import bend-collections-laws-crypto@1.0.0.0/spec/crypto/chacha.bend as Chachaimport Base
18# Element i of a list, 0 past its end.
19def get(xs: List<&2, U32>, i: Nat) -> U32:
20 match xs i:
21 case Nil{} _: 0
22 case x <> rest 0n: x
23 case x <> rest 1n+p: get(rest, p)
Uses (3)
Used by (11)
- bend-collections-laws-crypto@1.0.0.0/spec/crypto/chacha:hstate
- bend-collections-laws-crypto@1.0.0.0/spec/crypto/chacha:state
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/chacha/stream:key_eq
- bend-collections-laws-crypto@1.0.0.0/spec/crypto/chacha:hchacha_body
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/chacha/core:hbytes_correct
- …