The (rnrs sorting (6)) library provides procedures for sorting
lists and vectors.
These procedures return their input sorted in ascending order, without modifying the original data. proc must be a procedure that takes two elements from the input list or vector as arguments, and returns a true value if the first is “less” than the second,
#fotherwise.list-sortreturns a list;vector-sortreturns a vector.Both
list-sortandvector-sortare implemented in terms of thestable-sortprocedure from Guile's core library. See Sorting, for a discussion of the behavior of that procedure.
Performs a destructive, “in-place” sort of vector, using proc as described above to determine an ascending ordering of elements.
vector-sort!returns an unspecified value.This procedure is implemented in terms of the
sort!procedure from Guile's core library. See Sorting, for more information.