def replace
import bend-collections@1.0.0.0/src/containers/lru.bend as Lruimport Base
219# Present key: new entry in place, touched, counted as an insertion.
220def replace(a, -V: Kind(a), f: LRU<a, V>, +s: U32, e: Ent<a, V>) -> LRU<a, V>:
221 F{+cap, +n, +head, +tail, +free, m, tab, ks, ents, lk} = f
222 repl_fin(a, V, cap, n, head, tail, free, m, tab, ks, s, put_ent(a, V, ents, lk, s, e))