Documentation ¶
Index ¶
- func Keys[K comparable, V any]() comb.Comb[map[K]V, []K]
- func Pairs[K comparable, V any]() comb.Comb[map[K]V, []*Pair[K, V]]
- func SortedKeys[K cmp.Ordered, V any]() comb.Comb[map[K]V, []K]
- func SortedKeysFunc[K comparable, V any](fn slices.Compare[K]) comb.Comb[map[K]V, []K]
- func SortedValues[K comparable, V cmp.Ordered]() comb.Comb[map[K]V, []V]
- func SortedValuesFunc[K comparable, V any](fn slices.Compare[V]) comb.Comb[map[K]V, []V]
- func Values[K comparable, V any]() comb.Comb[map[K]V, []V]
- type Pair
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Keys ¶
func Keys[K comparable, V any]() comb.Comb[map[K]V, []K]
Keys returns a Comb that extracts the keys of a map and returns them as a slice.
func Pairs ¶
func Pairs[K comparable, V any]() comb.Comb[map[K]V, []*Pair[K, V]]
Pairs returns a Comb that extracts the keys and values of a map and returns them as a slice of typed pairs
func SortedKeys ¶
SortedKeys returns a Comb that extracts the keys of a map and returns them as a sorted slice.
func SortedKeysFunc ¶
SortedKeysFunc returns a Comb that extracts the keys of a map and returns them as a sorted slice using a custom comparison function.
func SortedValues ¶
func SortedValues[K comparable, V cmp.Ordered]() comb.Comb[map[K]V, []V]
SortedValues returns a Comb that extracts the values of a map and returns them as a sorted slice.
func SortedValuesFunc ¶
SortedValuesFunc returns a Comb that extracts the values of a map and returns them as a sorted slice using a custom comparison function.
Types ¶
type Pair ¶
type Pair[K comparable, V any] struct { Key K Value V }