def pool_next

bend-collections@1.0.0.0 · src/containers/internal/intrusive_list.bend:640

import bend-collections@1.0.0.0/src/containers/internal/intrusive_list.bend as IntrusiveList
import Base
import bend-collections@1.0.0.0/src/containers/types/intrusive_doubly_linked_list.bend as E

640def pool_next(~S: Type, ~N: Data, ~C: Data, ~next: S -> N -> S & Maybe<&2, N>, ~set_next: S -> N -> Maybe<&2, N> -> S, ~make: S -> C -> S & N, s: S, pool: E.Pool<N>, +c: C) -> S & (E.Pool<N> & N):
641  match pool:
642    case E.Pool{None{}, count}: pool_fresh(~S, ~N, ~C, ~next, ~set_next, ~make, s, c)
643    case E.Pool{Some{node}, count}: pool_take(~S, ~N, ~C, ~next, ~set_next, ~make, s, node, count)

Uses (5)

Used by (1)