Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextDoneVar ¶
Returns an STM var that contains a bool equal to `ctx.Err != nil`, and a cancel function to be called when the user is no longer interested in the var.
Types ¶
type KeyConstraint ¶ added in v0.5.0
type KeyConstraint interface { comparable }
This is the type constraint for keys passed through from github.com/benbjohnson/immutable.
type Mappish ¶
type Mappish[K, V any] interface { Set(K, V) Mappish[K, V] Delete(key K) Mappish[K, V] Get(key K) (V, bool) Range(func(K, V) bool) Len() int iter.Iterable }
func NewMap ¶
func NewMap[K KeyConstraint, V any]() Mappish[K, V]
func NewSortedMap ¶
func NewSortedMap[K KeyConstraint, V any](less lessFunc[K]) Mappish[K, V]
type Settish ¶
type Settish[K KeyConstraint] interface { Add(K) Settish[K] Delete(K) Settish[K] Contains(K) bool Range(func(K) bool) iter.Iterable Len() int }
func NewSet ¶
func NewSet[K KeyConstraint]() Settish[K]
func NewSortedSet ¶
func NewSortedSet[K KeyConstraint](lesser lessFunc[K]) Settish[K]
Click to show internal directories.
Click to hide internal directories.