def all_exhausted

cswap-bend-cli@0.1.0.0 · policy/exhaust.bend:62

import cswap-bend-cli@0.1.0.0/policy/exhaust.bend as Exhaust
import Base
import cswap-bend-cli@0.1.0.0/policy/types.bend as T
import cswap-bend-cli@0.1.0.0/policy/rank.bend as R

62# Every OAuth candidate is readable and at its limit.
63def all_exhausted(+as: List<&2, T.Account>, +active: Nat, +us: List<&2, T.Usage>, +now: Nat, +ms: List<&2, String>) -> Bool:
64  match as:
65    case Nil{}:
66      True{}
67    case Con{a, t}:
68      exhausted.at(R.isc(a, active), readable.acct(a, active, us, now, ms)) && all_exhausted(t, active, us, now, ms)

Uses (10)

Used by (1)