Lru.insert_slot: def of bend-collections@1.0.0.0
Import: import bend-collections@1.0.0.0/src/containers/lru.bend as Lru
Lines 340-343 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=340&end_line=343
import Base
# Store a new key (its bucket already written) in a free or fresh slot.
def insert_slot(a, -V: Kind(a), f: LRU, key: String, +h: U32, e: Ent) -> LRU:
F{+cap, +n, +head, +tail, +free, m, tab, ks, ents, lk} = f
alloc_pick(a, V, cap, n, head, tail, free, m, tab, ks, ents, lk, key, h, e, U32.is_eq(free, 0))
Uses (6):
https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String
https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32
https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_eq
https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/containers/lru.bend&name=Ent
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=alloc_pick