func (q Query) GroupBy(keySelector func(T) T, valueSelector func(T) T) (map[T][]T, error) {
	var results = make(map[T][]T)
	var collection = q.values
	for _, c := range collection {
		key := keySelector(c)
		results[key] = append(results[key], valueSelector(c))
	}
	return results, nil
}
// GroupBy returns a map with your specific key and value.
//
// keySelector extracts a key from slice for map key
//
// valueSelector extracts a key from slice for map value
GroupBy returns a map with your specific key and value.

keySelector extracts a key from slice for map key

valueSelector extracts a key from slice for map value
// GroupBy returns a map with your specific key and value . // // keySelector extracts a key from slice for map key // // valueSelector extracts a key from slice for map value
func (q Query) GroupBy(keySelector func(T) T, valueSelector func(T) T) (map[T][]T, error) {
	var results = make(map[T][]T)
	var collection = q.values
	for _, c := range collection {
		key := keySelector(c)
		results[key] = append(results[key], valueSelector(c))
	}
	return results, nil
}
func ( q Query ) GroupBy ( keySelector func ( T ) T , valueSelector func ( T ) T ) ( map [ T ] [ ] T , error ) { var results = make ( map [ T ] [ ] T ) var collection = q . values for _ , c := range collection { key := keySelector ( c ) results [ key ] = append ( results [ key ] , valueSelector ( c ) ) } return results , nil }
GroupBy returns a map with your specific key and value.
GroupBy returns a map with your specific key and value .