Lru.resize: def of bend-collections@1.0.0.0
Import: import bend-collections@1.0.0.0/src/containers/lru.bend as Lru
Lines 774-777 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=774&end_line=777
import Base
# Set a positive capacity, evicting the oldest entries until the cache fits;
# reports how many were evicted. Capacity 0 fails and changes nothing.
def resize(a, -V: Kind(a), f: LRU, +cap: U32) -> LRU & Result<&2, &2, String, U32>:
resize_go(a, V, f, cap, U32.is_eq(cap, 0))
Uses (7):
https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair
https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result
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=LRU
https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/containers/lru.bend&name=resize_go