def link_in
bend-collections@1.0.0.0 · src/containers/internal/dlist_storage.bend:98
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
98
99def link_in(~T: Data, +tag: U32, +n: U32, +nfresh: U32, +nfree: 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) -> DList<T> & E.Handle:
100 (DL{tag, nfresh, nfree, 1n+count, pick_end(U32.is_eq(a, nil()), link(n), head), pick_end(U32.is_eq(b, nil()), link(n), tail), depth, cap,
101 Array.set(Maybe<&2, T>, vals, n, Some{x}),
102 set_next(Array.set(U32, prevs, n, a), b, link(n)),
103 set_next(Array.set(U32, nexts, n, b), a, link(n))}, E.H{tag, n})