DlistStorage.link_in: def of bend-collections@1.0.0.0 Import: import bend-collections@1.0.0.0/src/containers/internal/dlist_storage.bend as DlistStorage Lines 98-103 of bend-collections@1.0.0.0/src/containers/internal/dlist_storage.bend: https://jend.leeeet.dev/read.txt?path=bend-collections@1.0.0.0/src/containers/internal/dlist_storage.bend&start_line=98&end_line=103 import Base import bend-collections@1.0.0.0/src/containers/types/internal_dlist.bend as E # Store x at slot n between the links a and b (either may be nil) and relink them. def link_in(~T: Data, +tag: U32, +n: U32, +nfresh: U32, +nfree: U32, count: Nat, +head: U32, +tail: U32, +depth: Nat, +cap: U32, vals: Array>, prevs: Array, nexts: Array, +a: U32, +b: U32, x: T) -> DList & E.Handle: (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, Array.set(Maybe<&2, T>, vals, n, Some{x}), set_next(Array.set(U32, prevs, n, a), b, link(n)), set_next(Array.set(U32, nexts, n, b), a, link(n))}, E.H{tag, n}) Uses (14): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array.set https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma 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/internal/dlist_storage.bend&name=DList https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/containers/internal/dlist_storage.bend&name=link https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/containers/internal/dlist_storage.bend&name=nil https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/containers/internal/dlist_storage.bend&name=pick_end https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/containers/internal/dlist_storage.bend&name=set_next https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/containers/types/internal_dlist.bend&name=Handle