def oldest
import cswap-bend-cli@0.1.0.0/daemon/plan.bend as Planimport 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
92# The due candidate with the oldest measurement (the first wins ties).
93def oldest(+es: List<&2, G.Ent>, +us: List<&2, T.Usage>, +best: Maybe<&2, G.Ent>) -> Maybe<&2, G.Ent>:
94 match es:
95 case Nil{}:
96 best
97 case Con{e, t}:
98 oldest(t, us, older(e, best, us))