def get

bend-collections-laws-crypto@1.0.0.0 · spec/crypto/chacha.bend:18

import bend-collections-laws-crypto@1.0.0.0/spec/crypto/chacha.bend as Chacha
import 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)