def prepend_as

bend-collections@1.0.0.0 · src/containers/intrusive_doubly_linked_list.bend:32

import bend-collections@1.0.0.0/src/containers/intrusive_doubly_linked_list.bend as IntrusiveDoublyLinkedList
import Base
import bend-collections@1.0.0.0/src/containers/internal/intrusive_list.bend as Impl

32# Prepend a detached node in O(1), using separate read/write contexts.
33# Calls the nonempty root setter exactly once.
34def prepend_as(~S: Type, ~N: Data, ~H: Data, ~I: Data, ~get_head: S -> H -> S & Maybe<&2, N>, ~set_next: S -> N -> Maybe<&2, N> -> S, ~set_prev: S -> N -> Maybe<&2, N> -> S, ~set_head_nonempty: S -> I -> N -> S, s: S, +h: H, +i: I, +node: N) -> S:
35  Impl.prepend_as(~S, ~N, ~H, ~I, ~get_head, ~set_next, ~set_prev, ~set_head_nonempty, s, h, i, node)

Uses (3)

Used by (1)