Skip to content

Glossary: Algorithms Beyond the Basics in Go

slices.SortFunc

Also written: SortFunc

A Go function that sorts a slice in place using a comparison function you supply. Sort a `slices.Clone` copy so the caller's order doesn't change.

Where the book teaches it

Related terms

cmp.CompareFunction valueCopy (of a slice)