Copyright | (C) Frank Staals |
---|---|
License | see the LICENSE file |
Maintainer | Frank Staals |
Safe Haskell | None |
Language | GHC2021 |
Sorting foldable collections by using fast sorting functions from vector-algorithms.
Documentation
sortBy :: forall vector f a. (Foldable f, Vector vector a) => (a -> a -> Ordering) -> f a -> vector a Source #
Sort a collection using the given comparator using intro-sort (essentially quicksort).
\(O(T n\log n)\), where \(T\) is the time to do a comparison.