Need help!
a function that allows you to group the elements of a slice based on a 
passed function that returns a key for each element of the slice

func Partition[S any, K comparable](slice []S, fn func(S) K) map[K][]S { }


a function that allows you to select elements from a slice
based on a given predicate function

func Select[S any](slice []S, fn func(S) bool) []S {}

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/61fffde8-d9cb-43c8-822e-557d3a5b4a0dn%40googlegroups.com.

Reply via email to