Lru.qrm: def of bend-collections@1.0.0.0 Import: import bend-collections@1.0.0.0/src/containers/lru.bend as Lru Lines 666-682 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=666&end_line=682 import Base import bend-collections@1.0.0.0/src/containers/hash_table.bend as H # Fused one-character remove: the probe loop finishes the operation itself, # so no continuation is pushed around it. def qrm(a, -V: Kind(a), fuel: Nat, s: H.QStep, +mask: U32, +w: U32, +i: U32, +cap: U32, +n: U32, +head: U32, +tail: U32, +free: U32, m: Array, ks: Array, ents: Array>, lk: Array) -> LRU & Maybe: match fuel s: case 0n H.QEnd{tab}: (F{cap, n, head, tail, free, m, tab, ks, ents, lk}, None{}) case 0n H.QHit{tab, +l}: drop_slot(a, V, F{cap, n, head, tail, free, m, H.del_at(tab, mask, i), ks, ents, lk}, H.slot(l), 2) case 0n H.QNext{tab}: (F{cap, n, head, tail, free, m, tab, ks, ents, lk}, None{}) case 1n+p H.QEnd{tab}: (F{cap, n, head, tail, free, m, tab, ks, ents, lk}, None{}) case 1n+p H.QHit{tab, +l}: drop_slot(a, V, F{cap, n, head, tail, free, m, H.del_at(tab, mask, i), ks, ents, lk}, H.slot(l), 2) case 1n+p H.QNext{tab}: +j = H.bnext(i, mask) qrm(a, V, p, H.qstep(tab, j, w), mask, w, j, cap, n, head, tail, free, m, ks, ents, lk) Uses (14): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma 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=bend-collections@1.0.0.0/src/containers/hash_table.bend&name=QStep https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/containers/hash_table.bend&name=bnext https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/containers/hash_table.bend&name=del_at https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/containers/hash_table.bend&name=qstep https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/containers/hash_table.bend&name=slot 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_slot