Debian Codegraph @

sort/README

raw
1 sort: sorting algorithms and support for sorted data structures
2
3 The sort module provides functions for sorting slices, as well as operations on
4 sorted slices, such as binary search.
5
6 The functions [[sort]] and [[search]] are provided for working with generic
7 slices. In order to work with a user-supplied slice of an arbitrary type, the
8 slice must be cast to []opaque and the size of the member type passed alongside
9 it (e.g. size(int)). The functions also take in a [[cmpfunc]] argument, which is
10 called to determine how the slice items should be ordered.