commit f65b9680cd17e14119bf7cb7d2e11c694a6bfb69 parent 896ca140dc9300485fe5e94ad2f8b9cb730227c7 Author: Sebastian <email@example.com> Date: Sat, 2 Apr 2022 00:05:24 -0400 sort: add README Signed-off-by: Sebastian <firstname.lastname@example.org> Diffstat:
1 file changed, 8 insertions(+), 0 deletions(-)
diff --git a/sort/README b/sort/README @@ -0,0 +1,8 @@ +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 void 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.