def Slot.complete

bend-kit-cache@0.3.0.0 · cache.bend:88

import bend-kit-cache@0.3.0.0/cache.bend as Cache
import 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))

Uses (9)

Used by (1)