Documentation
¶
Index ¶
- func ContainsValue[K, V comparable](haystack map[K]V, needle V) bool
- func CopyIterator[T any](it iterators.Iterator[*T]) (iterators.Iterator[*T], error)
- func CopyMap[K comparable, V any](to map[K]V, from map[K]V)
- func Difference[V comparable](a, b []V) []V
- func Filter[A any](iterator iterators.Iterator[*A], filter iterators.Predicate[*A]) iterators.Iterator[*A]
- func GetUnique[T any](vs iterators.Iterator[T]) (T, error)
- func Intersection[V comparable](a, b []V) []V
- func InverseMap[K comparable, V comparable](in map[K]V) map[V]K
- func Keys[K comparable, V any](m map[K]V) []K
- func Map[A any, B any](iterator iterators.Iterator[A], transformer func(A) (B, error)) iterators.Iterator[B]
- func NewEmptyIterator[K any]() iterators.Iterator[K]
- func NewPermutatedIterator[T any](it iterators.Iterator[*T]) (iterators.Iterator[*T], error)
- func NewSet[V comparable](items ...V) sets.Set[V]
- func NewSingleIterator[T any](item T) iterators.Iterator[T]
- func NewSliceIterator[T any](items []T) iterators.Iterator[T]
- func ReadAll[T any](it iterators.Iterator[*T]) ([]T, error)
- func ReadFirst[T any](it iterators.Iterator[*T], limit int) ([]T, error)
- func Remove[T comparable](items []T, toRemove T) ([]T, bool)
- func Repeat[T any](item T, times int) []T
- func RepeatValue[K comparable, V any](keys []K, val V) map[K]V
- func SubMap[K comparable, V any](m map[K]V, ks ...K) (map[K]V, []K)
- func Values[K comparable, V any](m map[K]V) []V
- type Iterator
- type Set
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainsValue ¶ added in v0.4.1
func ContainsValue[K, V comparable](haystack map[K]V, needle V) bool
func CopyIterator ¶
func CopyMap ¶
func CopyMap[K comparable, V any](to map[K]V, from map[K]V)
func Difference ¶
func Difference[V comparable](a, b []V) []V
func Intersection ¶
func Intersection[V comparable](a, b []V) []V
func InverseMap ¶
func InverseMap[K comparable, V comparable](in map[K]V) map[V]K
func Keys ¶
func Keys[K comparable, V any](m map[K]V) []K
func NewEmptyIterator ¶
func NewPermutatedIterator ¶
func NewSet ¶
func NewSet[V comparable](items ...V) sets.Set[V]
func NewSingleIterator ¶ added in v0.4.1
func NewSliceIterator ¶
func Remove ¶
func Remove[T comparable](items []T, toRemove T) ([]T, bool)
func RepeatValue ¶
func RepeatValue[K comparable, V any](keys []K, val V) map[K]V
func SubMap ¶
func SubMap[K comparable, V any](m map[K]V, ks ...K) (map[K]V, []K)
func Values ¶
func Values[K comparable, V any](m map[K]V) []V
Types ¶
type Set ¶
type Set[V comparable] sets.Set[V]
Click to show internal directories.
Click to hide internal directories.