sort ( seq quot: ( obj1 obj2 -- <=> ) -- sortedseq )
Factor handbook » The language » Collections » Sequence operations » Sorting sequences

Next:sort-with ( seq quot: ( elt -- key ) -- sortedseq )


Vocabulary
sorting

Inputs
seqa sequence
quota quotation with stack effect ( obj1 obj2 -- <=> )


Outputs
sortedseqa new sorted sequence


Word description
Sorts the elements of seq into a new array using a stable sort.

Notes
The algorithm used is the merge sort.

Definition