hare

[hare] The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

README (493B)


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