def ins_free_pick

bend-collections@1.0.0.0 · src/containers/internal/dlist_storage.bend:383

import bend-collections@1.0.0.0/src/containers/internal/dlist_storage.bend as DlistStorage
import Base
import bend-collections@1.0.0.0/src/containers/types/internal_dlist.bend as E

383def ins_free_pick(~T: Data, +tag: U32, +fresh: U32, +free: U32, count: Nat, +head: U32, +tail: U32, +depth: Nat, +cap: U32, vals: Array<Maybe<&2, T>>, prevs: Array<U32>, nexts: Array<U32>, +a: U32, +b: U32, x: T, empty: Bool) -> DList<T> & E.Handle:
384  match empty:
385    case True{}:
386      insert_between(~T, tag, fresh, free, count, head, tail, depth, cap, vals, prevs, nexts, a, b, x)
387    case False{}:
388      ins_free_pop(~T, tag, fresh, free, count, head, tail, depth, cap, vals, prevs, a, b, x, link_at(nexts, slot(free)))

Uses (12)

Used by (1)