def lookup
import bend-collections-laws-math@1.0.0.0/proofs/lib/lemmas/src/cache.bend as Cacheimport Base
import bend-collections-laws-math@1.0.0.0/proofs/lib/lemmas/types/model.bend as T
82def lookup(-K: Data, -V: Data, c: Cache<K, V>, code: String) -> Maybe<&2, T.Entry<K, V>>:
83 State{cap, m, order, life, counts, cb} = c
84 lookup_result(K, V, Map.get(Maybe<&2, T.Entry<K, V>>, None{}, m, code))
Uses (6)
Used by (5)
- bend-collections-laws-math@1.0.0.0/proofs/lib/lemmas/src/cache:read_encoded
- bend-collections-laws-math@1.0.0.0/proofs/lib/lemmas/src/cache:remove_encoded
- bend-collections-laws-math@1.0.0.0/proofs/lib/lemmas/src/cache:add_with_lifetime
- bend-collections-laws-math@1.0.0.0/proofs/lib/lemmas/src/cache:first_entry
- bend-collections-laws-math@1.0.0.0/proofs/lib/lemmas/src/cache:get_and_refresh