File: README

package info (click to toggle)
hare 0.25.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,948 kB
  • sloc: asm: 1,264; makefile: 123; sh: 114; lisp: 101
file content (10 lines) | stat: -rw-r--r-- 558 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
sort: sorting algorithms and support for sorted data structures

The sort module provides functions for sorting slices, as well as operations on
sorted slices, such as binary search.

The functions [[sort]] and [[search]] are provided for working with generic
slices. In order to work with a user-supplied slice of an arbitrary type, the
slice must be cast to []opaque and the size of the member type passed alongside
it (e.g. size(int)). The functions also take in a [[cmpfunc]] argument, which is
called to determine how the slice items should be ordered.