Lru.purge: def of bend-collections@1.0.0.0
Import: import bend-collections@1.0.0.0/src/containers/lru.bend as Lru
Lines 728-731 of bend-collections@1.0.0.0/src/containers/lru.bend: https://jend.leeeet.dev/read.txt?path=bend-collections@1.0.0.0/src/containers/lru.bend&start_line=728&end_line=731
import Base
# Every entry and the metrics are cleared; the table keeps its size.
def purge(a, -V: Kind(a), f: LRU) -> LRU & U32:
F{+cap, +n, head, tail, free, m, tab, ks, ents, lk} = f
purge_b(a, V, cap, n, ks, ents, lk, Array.get(U32, m, 7))
Uses (5):
https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array.get
https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair
https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32
https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/containers/lru.bend&name=LRU
https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/containers/lru.bend&name=purge_b