next up previous contents index
Next: BoundedFiniteDataStructureType Up: ArrayType Previous: resize!   Contents   Index


sort!


Usage

sort! a
sort!(a, f)


Signature

sort!: (%,(T,T) $\to$ Boolean) $\to$ %


Parameter Type Description
a % a primitive array
f (T, T) $\to$ Boolean a comparison function


Description

Sorts the array $a$ using the ordering $x < y \iff f(x,y)$. The comparison function $f$ is optional if $T$ has TotallyOrderedType, in which case the order function of $T$ is taken.



Manuel Bronstein 2004-06-28