| Safe Haskell | Safe-Inferred |
|---|---|
| Language | GHC2021 |
Harpie.Sort
Description
Vector sort routines.
Documentation
sortV :: Ord a => Vector a -> Vector a Source #
return the sorted array
>>>sortV (V.fromList [3,1,4,2,0,5::Int])[0,1,2,3,4,5]
sortByV :: Ord b => (a -> b) -> Vector a -> Vector a Source #
return the array sorted by the comparison function
>>>sortByV Down (V.fromList [3,1,4,2,0,5::Int])[5,4,3,2,1,0]