def fresh.at
cswap-bend-cli@0.1.0.0 · policy/usage.bend:170
import cswap-bend-cli@0.1.0.0/policy/usage.bend as Usage
import Base
import cswap-bend-cli@0.1.0.0/policy/types.bend as T
170
171
172
173def fresh.at(+fa: Maybe<&2, Nat>, +now: Nat, +e: T.ErrKind, +nf: Nat, +np: Maybe<&2, Nat>, +hu: Nat, +cu: Nat, +soonest: Maybe<&2, Nat>) -> Bool:
174 match fa:
175 case None{}:
176 False{}
177 case Some{f}:
178 fresh.age(Nat.sub(now, f), fresh.ext(now, nf, np, hu, cu), within.ceiling(e, Nat.sub(now, f), now, soonest))