Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Group ¶
type Group[I any, K comparable] struct { Key K Members []I }
func GroupBy ¶
func GroupBy[I any, K comparable](items []I, keyFn func(I) K) []Group[I, K]
GroupBy partitions items into groups by applying keyFn to each element. Groups are returned in the order their keys first appear in items.
Click to show internal directories.
Click to hide internal directories.