def nth
import bend-collections-laws-crypto@1.0.0.0/spec/crypto/blake/blake2b.bend as Blake2bimport 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)