GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Sort(3) OCamldoc Sort(3)

Sort - Sorting and merging lists.

Module Sort

Module Sort : sig end

Deprecated. This module is obsolete and exists only for backward compatibility. The sorting functions in Array and List should be used instead. The new functions are faster and use less memory.

Sorting and merging lists.

val list : ('a -> 'a -> bool) -> 'a list -> 'a list

Sort a list in increasing order according to an ordering predicate. The predicate should return true if its first argument is less than or equal to its second argument.

val array : ('a -> 'a -> bool) -> 'a array -> unit

Sort an array in increasing order according to an ordering predicate. The predicate should return true if its first argument is less than or equal to its second argument. The array is sorted in place.

val merge : ('a -> 'a -> bool) -> 'a list -> 'a list -> 'a list

Merge two lists according to the given predicate. Assuming the two argument lists are sorted according to the predicate, merge returns a sorted list containing the elements from the two lists. The behavior is undefined if the two argument lists were not sorted.

source: 2022-04-09

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.