Hoogle Search
Within LTS Haskell 24.32 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
unstableSort :: Ord a => Seq a -> Seq acontainers Data.Sequence unstableSort sorts the specified Seq by the natural ordering of its elements, but the sort is not stable. This algorithm is frequently faster and uses less memory than sort.
unstableSortBy :: (a -> a -> Ordering) -> Seq a -> Seq acontainers Data.Sequence A generalization of unstableSort, unstableSortBy takes an arbitrary comparator and sorts the specified sequence. The sort is not stable. This algorithm is frequently faster and uses less memory than sortBy.
unstableSortOn :: Ord b => (a -> b) -> Seq a -> Seq acontainers Data.Sequence unstableSortOn sorts the specified Seq by comparing the results of a key function applied to each element. unstableSortOn f is equivalent to unstableSortBy (compare `on` f), but has the performance advantage of only evaluating f once for each element in the input list. This is called the decorate-sort-undecorate paradigm, or Schwartzian transform. An example of using unstableSortOn might be to sort a Seq of strings according to their length:
unstableSortOn length (fromList ["alligator", "monkey", "zebra"]) == fromList ["zebra", "monkey", "alligator"]
If, instead, unstableSortBy had been used, length would be evaluated on every comparison, giving <math> evaluations, rather than <math>. If f is very cheap (for example a record selector, or fst), unstableSortBy (compare `on` f) will be faster than unstableSortOn f.unstableSort :: Ord a => Seq a -> Seq acontainers Data.Sequence.Internal.Sorting unstableSort sorts the specified Seq by the natural ordering of its elements, but the sort is not stable. This algorithm is frequently faster and uses less memory than sort.
unstableSortBy :: (a -> a -> Ordering) -> Seq a -> Seq acontainers Data.Sequence.Internal.Sorting A generalization of unstableSort, unstableSortBy takes an arbitrary comparator and sorts the specified sequence. The sort is not stable. This algorithm is frequently faster and uses less memory than sortBy.
unstableSortOn :: Ord b => (a -> b) -> Seq a -> Seq acontainers Data.Sequence.Internal.Sorting unstableSortOn sorts the specified Seq by comparing the results of a key function applied to each element. unstableSortOn f is equivalent to unstableSortBy (compare `on` f), but has the performance advantage of only evaluating f once for each element in the input list. This is called the decorate-sort-undecorate paradigm, or Schwartzian transform. An example of using unstableSortOn might be to sort a Seq of strings according to their length:
unstableSortOn length (fromList ["alligator", "monkey", "zebra"]) == fromList ["zebra", "monkey", "alligator"]
If, instead, unstableSortBy had been used, length would be evaluated on every comparison, giving <math> evaluations, rather than <math>. If f is very cheap (for example a record selector, or fst), unstableSortBy (compare `on` f) will be faster than unstableSortOn f.getSorted :: SortedList a -> [a]QuickCheck Test.QuickCheck No documentation available.
getSorted :: SortedList a -> [a]QuickCheck Test.QuickCheck.Modifiers No documentation available.
getSorted :: SortedList a -> [a]tasty-quickcheck Test.Tasty.QuickCheck No documentation available.
-
ghc-prim GHC.Types No documentation available.