Lru.drop_core: def of bend-collections@1.0.0.0
Import: import bend-collections@1.0.0.0/src/containers/lru.bend as Lru
Lines 232-236 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=232&end_line=236
import Base
# Unlink live slot s, free it and count it (c = 1 eviction, 2 removal); the
# table is updated by the caller.
def drop_core(a, -V: Kind(a), f: LRU, +s: U32, +c: U32) -> LRU & Maybe:
F{+cap, +n, +head, +tail, +free, m, tab, ks, ents, lk} = f
drop_e(a, V, cap, n, head, tail, free, m, tab, ks, lk, s, c, Array.swap(Maybe, ents, s, None{}))
Uses (6):
https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array.swap
https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe
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=drop_e