Structures |
Signatures | | Identifiers |
Signature LISTSORT
List sort operations.
Operations for sorting lists and for checking if a list is sorted.
structure Listsort : LISTSORT
signature LISTSORT =
sig
val sort : ('a * 'a -> order) -> 'a list -> 'a list
val sorted : ('a * 'a -> order) -> 'a list -> bool
end
- [sort ordr xs]
- sorts the list xs in nondecreasing order, using the
given ordering. Uses Richard O'Keefe's smooth applicative merge sort.
- [sorted ordr xs]
- checks that the list xs is sorted in nondecreasing
order, in the given ordering.
Generated by SigDoc