def nth

bend-collections-laws-crypto@1.0.0.0 · spec/crypto/blake/blake2b.bend:79

import bend-collections-laws-crypto@1.0.0.0/spec/crypto/blake/blake2b.bend as Blake2b
import Base

79def nth(-A: Data, xs: List<&2,A>, n: Nat, +zero: A) -> A:
80  match xs n:
81    case Nil{} _: zero
82    case x <> rest 0n: x
83    case x <> rest 1n+p: nth(A,rest,p,zero)

Uses (2)

Used by (2)