def rec.ge_minus

cswap-bend-cli@0.1.0.0 · policy/rank.bend:26

import cswap-bend-cli@0.1.0.0/policy/rank.bend as Rank
import Base

26# c >= a - 300 s (the recovery hysteresis), with inf for None.
27def rec.ge_minus(+c: Maybe<&2, Nat>, +a: Maybe<&2, Nat>) -> Bool:
28  match c a:
29    case None{} _:
30      True{}
31    case Some{t} None{}:
32      False{}
33    case Some{t} Some{x}:
34      Nat.is_ge(Nat.add(t, 300n), x)

Uses (5)

Used by (1)