def Slot.complete
import bend-kit-cache@0.3.0.0/cache.bend as Cacheimport Base
88# Stores the result of fetch g, unless g is stale or was never issued.
89def Slot.complete(-V: Data, p: Policy, s: Slot<V>, +g: Nat, at: Nat, r: Found<V>) -> Slot<V>:
90 Slot{+n, +f, m} = s
91 Slot.complete.if(V, Nat.is_le(f, g) && Nat.is_lt(g, n), n, f, m, g, Entry.of(V, r, p, at))