Pick.first: def of cswap-bend-cli@0.1.0.0 Import: import cswap-bend-cli@0.1.0.0/policy/pick.bend as Pick Lines 211-217 of cswap-bend-cli@0.1.0.0/policy/pick.bend: https://jend.leeeet.dev/read.txt?path=cswap-bend-cli@0.1.0.0/policy/pick.bend&start_line=211&end_line=217 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 import cswap-bend-cli@0.1.0.0/policy/rank.bend as R # The first account (sequence order breaks ties) whose candidate headroom is h. def first(+as: List<&2, T.Account>, +s: R.Sel, +h: Nat) -> Maybe<&2, Nat>: match as: case Nil{}: None{} case Con{a, t}: first.pick(first.hit(R.cand(a, s), h), U.account.slot(a), first(t, s, h)) Uses (9): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/policy/pick.bend&name=first.hit https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/policy/pick.bend&name=first.pick https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/policy/rank.bend&name=Sel https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/policy/rank.bend&name=cand https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/policy/types.bend&name=Account https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/policy/usage.bend&name=account.slot