def refresh_found

bend-collections-laws-math@1.0.0.0 · proofs/lib/lemmas/src/cache.bend:205

import bend-collections-laws-math@1.0.0.0/proofs/lib/lemmas/src/cache.bend as Cache
import Base
import bend-collections-laws-math@1.0.0.0/proofs/lib/lemmas/types/model.bend as T

205def refresh_found(-K: Data, -V: Data, +c: Cache<K, V>, +code: String, deadline: T.Int64, found: Maybe<&2, T.Entry<K, V>>) -> Step<K, V>:
206  match found:
207    case None{}:
208      counted(K, V, Out{c, None{}, False{}, Nil{}}, True{}, False{})
209    case Some{T.Item{k, v, old}}:
210      +entry = {T.Item{k, v, deadline} : T.Entry<K, V>}
211      refresh_present(K, V, c, code, entry)

Uses (10)

Used by (1)