def firstrh

cswap-bend-cli@0.1.0.0 · policy/pick.bend:336

import cswap-bend-cli@0.1.0.0/policy/pick.bend as Pick
import Base
import cswap-bend-cli@0.1.0.0/policy/types.bend as T
import cswap-bend-cli@0.1.0.0/policy/usage.bend as U

336# The first account whose key is exactly (r0, h0).
337def firstrh(+as: List<&2, T.Account>, +rk: Rk, +f: Fam, +r0: Maybe<&2, Nat>, +h0: Nat) -> Maybe<&2, Nat>:
338  match as:
339    case Nil{}:
340      None{}
341    case Con{a, t}:
342      first.pick(firstrh.hit(cdn(a, rk, f), r0, h0), U.account.slot(a), firstrh(t, rk, f, r0, h0))

Uses (10)

Used by (2)