def add_pick

bend-collections@1.0.0.0 · src/containers/lru.bend:401

import bend-collections@1.0.0.0/src/containers/lru.bend as Lru
import Base
import bend-collections@1.0.0.0/src/containers/hash_table.bend as H

401def add_pick(a, -V: Kind(a), f: LRU<a, V>, key: String, +at: U32, +h: U32, +l: U32, e: Ent<a, V>, absent: Bool) -> LRU<a, V> & Bool:
402  match absent:
403    case False{}:
404      (replace(a, V, f, H.slot(l), e), False{})
405    case True{}:
406      add_full(a, V, f, key, at, h, e)

Uses (10)

Used by (1)