empty : Nat -> LRUCache k v Create an empty LRUCache of the given size.
Totality: total
Visibility: exportinsert : Hashable k => Ord k => k -> v -> LRUCache k v -> LRUCache k v Insert an element into the LRUCache.
Totality: total
Visibility: exportinsertView : Hashable k => Ord k => k -> v -> LRUCache k v -> (Maybe (k, v), LRUCache k v) Insert an element into the LRUCache returning the evicted element if any.
When the logical clock reaches its maximum value and all values are
evicted Nothing is returned.
Totality: total
Visibility: exportlookup : Hashable k => Ord k => k -> LRUCache k v -> Maybe (v, LRUCache k v) Lookup an element in an LRUCache and mark it as the least recently accessed.
Totality: total
Visibility: export