Documentation ¶
Index ¶
- func Any[T Element[T]](ctx context.Context, c Container[T], f func(T) bool) (ok bool, err error)
- func ChanToSlice[T any](ctx context.Context, c <-chan T) (slice []T, err error)
- func Concatenate[T any](ins ...[]T) (out []T)
- func Each[T any](ctx context.Context, ts []T, f func(*T) bool) error
- func EachErr[T any](ctx context.Context, ts []T, f func(*T) (bool, error)) error
- func ElementsEqual[T Element[T]](a, b T) bool
- func Filter[T any](f func(T) bool, in ...T) (out []T)
- func NonEmpty[T any](t []T) bool
- func SliceToChan[T any](ctx context.Context, slice []T, c chan<- T) (err error)
- func Sum[T constraints.Ordered](terms ...T) (sum T)
- func Transform[From, To any](ctx context.Context, transformer func(From) To, from ...From) (to []To)
- func TransformErr[From, To any](ctx context.Context, transformer func(From) (To, error), from ...From) ([]To, error)
- func UnmarshalRegexp(re *regexp.Regexp, match []string, v interface{}) error
- type Chain
- type Container
- type Element
- type Merger
- type MergerTransformer
- type OrderedSet
- func (s *OrderedSet[T]) Contains(ctx context.Context, t T) (ok bool)
- func (s *OrderedSet) Each(ctx context.Context, f func(T) bool) error
- func (s OrderedSet) Empty() bool
- func (s *OrderedSet[T]) Insert(ctx context.Context, ts ...T) (inserted int)
- func (s OrderedSet) Len() int
- func (s *OrderedSet) RemoveIf(_ context.Context, f func(T) bool) (removed int, err error)
- func (s *OrderedSet) Slice() []T
- type Pather
- type SortedSet
- func (s *SortedSet[T]) Contains(ctx context.Context, t T) (ok bool)
- func (s *SortedSet) Each(ctx context.Context, f func(T) bool) error
- func (s SortedSet) Empty() bool
- func (s *SortedSet[T]) Insert(ctx context.Context, ts ...T) (inserted int)
- func (s *SortedSet[T]) IntDiff(ctx context.Context, other *SortedSet[T]) (thisDiff, intersection, otherDiff SortedSet[T])
- func (s SortedSet) Len() int
- func (s *SortedSet) RemoveIf(_ context.Context, f func(T) bool) (removed int, err error)
- func (s *SortedSet) Slice() []T
- type Transformer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChanToSlice ¶ added in v0.2.0
func Concatenate ¶ added in v0.1.0
func Concatenate[T any](ins ...[]T) (out []T)
func ElementsEqual ¶ added in v0.0.2
func SliceToChan ¶ added in v0.2.0
func Sum ¶ added in v0.2.0
func Sum[T constraints.Ordered](terms ...T) (sum T)
func TransformErr ¶ added in v0.0.2
Types ¶
type Chain ¶ added in v0.0.2
type Chain[T any] struct { Transformers []Transformer[T] ChanSize int }
type MergerTransformer ¶ added in v0.0.2
type MergerTransformer struct{}
func (MergerTransformer) Transformer ¶ added in v0.0.2
type OrderedSet ¶ added in v0.0.2
type OrderedSet[T Element[T]] struct { // contains filtered or unexported fields }
func NewOrderedSet ¶ added in v0.1.2
func NewOrderedSet[T Element[T]]( ctx context.Context, ts ...T, ) *OrderedSet[T]
func (*OrderedSet[T]) Contains ¶ added in v0.0.2
func (s *OrderedSet[T]) Contains(ctx context.Context, t T) (ok bool)
func (*OrderedSet[T]) Insert ¶ added in v0.0.2
func (s *OrderedSet[T]) Insert( ctx context.Context, ts ...T, ) (inserted int)
type SortedSet ¶ added in v0.0.2
type SortedSet[T Element[T]] struct { // contains filtered or unexported fields }
func NewSortedSet ¶ added in v0.0.2
Click to show internal directories.
Click to hide internal directories.