Documentation ¶
Index ¶
- func CompareIndex[A comparable, B constraints.Ordered](key A) Comparator[map[A]B]
- func CompareIndexBy[A comparable, B any](key A, compare Comparator[B]) Comparator[map[A]B]
- func CompareIndexOrd[A comparable, B Ord[B]](key A) Comparator[map[A]B]
- func ComparePairwise[A constraints.Ordered, B constraints.Ordered]() Comparator[map[A]B]
- func ComparePairwiseBy[A constraints.Ordered, B any](compare Comparator[B]) Comparator[map[A]B]
- func ComparePairwiseOrd[A constraints.Ordered, B Ord[B]]() Comparator[map[A]B]
- func EqualIndex[A comparable, B comparable](key A) Equaler[map[A]B]
- func EqualIndexBy[A comparable, B any](key A, equal Equaler[B]) Equaler[map[A]B]
- func EqualIndexEq[A comparable, B Eq[B]](key A) Equaler[map[A]B]
- func EqualPairwise[A comparable, B comparable]() Equaler[map[A]B]
- func EqualPairwiseBy[A comparable, B any](equal Equaler[B]) Equaler[map[A]B]
- func EqualPairwiseEq[A comparable, B Eq[B]]() Equaler[map[A]B]
- func FromSliceBy[A comparable, B any](merge func(B, B) B, ps []*Pair[A, B]) map[A]B
- func Iterator[K comparable, V any](xs map[K]V) iterable.Iterator[*base.Pair[K, V]]
- func Keys[K comparable, V any](xs map[K]V) []K
- func KeysIterator[K comparable, V any](xs map[K]V) iterable.Iterator[K]
- func Map[A comparable, B, C any](f func(B) C, xs map[A]B) map[A]C
- func MapWithKey[A comparable, B, C any](f func(A, B) C, xs map[A]B) map[A]C
- func Merge[A comparable, B constraints.Ordered](m1 map[A]B, m2 map[A]B) map[A]B
- func MergeBy[A comparable, B any](resolve func(A, B, B) B, m1 map[A]B, m2 map[A]B) map[A]B
- func MergeOrd[A comparable, B Ord[B]](m1 map[A]B, m2 map[A]B) map[A]B
- func ToSlice[A comparable, B any](m map[A]B) []*Pair[A, B]
- func Values[K comparable, V any](xs map[K]V) []V
- func ValuesIterator[K comparable, V any](xs map[K]V) iterable.Iterator[V]
- type Dict
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompareIndex ¶ added in v0.2.9
func CompareIndex[A comparable, B constraints.Ordered](key A) Comparator[map[A]B]
func CompareIndexBy ¶ added in v0.2.9
func CompareIndexBy[A comparable, B any](key A, compare Comparator[B]) Comparator[map[A]B]
CompareIndexBy compares a single index
func CompareIndexOrd ¶ added in v0.2.9
func CompareIndexOrd[A comparable, B Ord[B]](key A) Comparator[map[A]B]
func ComparePairwise ¶ added in v0.2.9
func ComparePairwise[A constraints.Ordered, B constraints.Ordered]() Comparator[map[A]B]
func ComparePairwiseBy ¶ added in v0.2.9
func ComparePairwiseBy[A constraints.Ordered, B any](compare Comparator[B]) Comparator[map[A]B]
ComparePairwiseBy works by projecting a map to a list, therefore it's inefficient and probably
best to avoid using unless absolutely necessary! Note: while `map` requires `A` to be `comparable`, *comparing* maps requires `A` to be Ordered as well!
func ComparePairwiseOrd ¶ added in v0.2.9
func ComparePairwiseOrd[A constraints.Ordered, B Ord[B]]() Comparator[map[A]B]
func EqualIndex ¶ added in v0.2.9
func EqualIndex[A comparable, B comparable](key A) Equaler[map[A]B]
func EqualIndexBy ¶ added in v0.2.9
func EqualIndexBy[A comparable, B any](key A, equal Equaler[B]) Equaler[map[A]B]
EqualIndexBy equals a single index
func EqualIndexEq ¶ added in v0.2.9
func EqualIndexEq[A comparable, B Eq[B]](key A) Equaler[map[A]B]
func EqualPairwise ¶ added in v0.2.9
func EqualPairwise[A comparable, B comparable]() Equaler[map[A]B]
func EqualPairwiseBy ¶ added in v0.2.9
func EqualPairwiseBy[A comparable, B any](equal Equaler[B]) Equaler[map[A]B]
EqualPairwiseBy works by project a map to a list, therefore it's inefficient and probably
best to avoid using unless absolutely necessary!
func EqualPairwiseEq ¶ added in v0.2.9
func EqualPairwiseEq[A comparable, B Eq[B]]() Equaler[map[A]B]
func FromSliceBy ¶
func FromSliceBy[A comparable, B any](merge func(B, B) B, ps []*Pair[A, B]) map[A]B
func Keys ¶ added in v0.3.0
func Keys[K comparable, V any](xs map[K]V) []K
func KeysIterator ¶ added in v0.2.1
func KeysIterator[K comparable, V any](xs map[K]V) iterable.Iterator[K]
func Map ¶
func Map[A comparable, B, C any](f func(B) C, xs map[A]B) map[A]C
func MapWithKey ¶ added in v0.2.0
func MapWithKey[A comparable, B, C any](f func(A, B) C, xs map[A]B) map[A]C
func Merge ¶
func Merge[A comparable, B constraints.Ordered](m1 map[A]B, m2 map[A]B) map[A]B
func MergeBy ¶
func MergeBy[A comparable, B any](resolve func(A, B, B) B, m1 map[A]B, m2 map[A]B) map[A]B
func MergeOrd ¶
func MergeOrd[A comparable, B Ord[B]](m1 map[A]B, m2 map[A]B) map[A]B
func ToSlice ¶
func ToSlice[A comparable, B any](m map[A]B) []*Pair[A, B]
func Values ¶ added in v0.3.0
func Values[K comparable, V any](xs map[K]V) []V
func ValuesIterator ¶ added in v0.2.1
func ValuesIterator[K comparable, V any](xs map[K]V) iterable.Iterator[V]
Types ¶
Click to show internal directories.
Click to hide internal directories.