Documentation ¶
Overview ¶
Package lmap provides helpers for the built in map type.
Note that there is also util/filter.Map which provides very powerful tools for performing filtering operations on a map.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SortKeys ¶
func SortKeys[K constraints.Ordered, V any](m map[K]V) slice.Slice[K]
SortKeys is a convenience function that returns the keys sorted keys. This is equivalent to calling m.Keys(nil).Sort(slice.LT[K]()). It assumes slice.LT for sorting and a nil buffer. If either of those assumtions are not true, use Keys and Sort explicitly.
func Unique ¶
func Unique[K comparable](s, buf []K) slice.Slice[K]
Types ¶
type Map ¶
type Map[K comparable, V any] map[K]V
Click to show internal directories.
Click to hide internal directories.