def due_cands
cswap-bend-cli@0.1.0.0 · daemon/plan.bend:70
import cswap-bend-cli@0.1.0.0/daemon/plan.bend as Plan
import Base
import cswap-bend-cli@0.1.0.0/policy/types.bend as T
import cswap-bend-cli@0.1.0.0/daemon/gather.bend as G
70
71def due_cands(+es: List<&2, G.Ent>, +us: List<&2, T.Usage>, +active: Maybe<&2, String>, +now: Nat, +cfg: T.Config) -> List<&2, G.Ent>:
72 match es:
73 case Nil{}:
74 []
75 case Con{e, t}:
76 sel_e(Bool.not(is_active(e, active)) && eligible(e) && due(e, us, now, cfg), e <> due_cands(t, us, active, now, cfg), due_cands(t, us, active, now, cfg))