def next_slot_m

bend-collections@1.0.0.0 · src/containers/lru.bend:345

import bend-collections@1.0.0.0/src/containers/lru.bend as Lru
import Base
import bend-collections@1.0.0.0/src/containers/hash_table.bend as H

345# The slot insert_slot will take: the free-list head, else the next fresh one.
346def next_slot_m(+free: U32, r: Array<U32> & U32) -> Array<U32> & U32:
347  (m, +fresh) = r
348  (m, pick(U32.is_eq(free, 0), fresh, H.slot(free)))

Uses (7)

Used by (1)