Lru.touch_go: def of bend-collections@1.0.0.0
Import: import bend-collections@1.0.0.0/src/containers/lru.bend as Lru
Lines 175-180 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=175&end_line=180
import Base
def touch_go(a, -V: Kind(a), f: LRU, +s: U32, newest: Bool) -> LRU:
match newest:
case True{}:
f
case False{}:
link_tail(a, V, unlink(a, V, f, s), s)
Uses (5):
https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool
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=link_tail
https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/containers/lru.bend&name=unlink