-
Notifications
You must be signed in to change notification settings - Fork 18.9k
x/exp/slices: "backport" slices.SortFunc #61374
Copy link
Copy link
Closed
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.
Milestone
Description
slices.SortFunc is coming soon:
https://pkg.go.dev/slices#SortFunc
but its not here yet. meanwhile, the signature:
func SortFunc[S ~[]E, E any](x S, cmp func(a, b E) int)is different from x/exp/slices:
func SortFunc[E any](x []E, less func(a, b E) bool)https://pkg.go.dev/golang.org/x/exp/slices#SortFunc
namely, the callback returns int instead of bool.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.