Hoogle Search

Within LTS Haskell 24.34 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. sortBy :: forall ty (n :: Nat) . (ty -> ty -> Ordering) -> Vect n ty -> Vect n ty

    basement Basement.Sized.Vect

    No documentation available.

  2. sortBy :: (Char -> Char -> Ordering) -> String -> String

    basement Basement.String

    Sort the character in a String using a specific sort function TODO: optimise not going through a list

  3. sortBy :: PrimType ty => (ty -> ty -> Ordering) -> UArray ty -> UArray ty

    basement Basement.UArray

    No documentation available.

  4. sortLines :: BufferM ()

    yi-core Yi.Buffer.HighLevel

    Sort the lines of the region.

  5. sortLinesWithRegion :: Region -> BufferM ()

    yi-core Yi.Buffer.HighLevel

    No documentation available.

  6. sortLines :: BufferM ()

    yi-core Yi.Config.Simple

    Sort the lines of the region.

  7. sortLinesWithRegion :: Region -> BufferM ()

    yi-core Yi.Config.Simple

    No documentation available.

  8. sortBy :: (a -> a -> Ordering) -> NonEmpty a -> NonEmpty a

    base-compat-batteries Data.List.NonEmpty.Compat

    sortBy for NonEmpty, behaves the same as sortBy

  9. sortOn :: Ord b => (a -> b) -> NonEmpty a -> NonEmpty a

    base-compat-batteries Data.List.NonEmpty.Compat

    Sort a NonEmpty on a user-supplied projection of its elements. See sortOn for more detailed information.

    Examples

    >>> sortOn fst $ (2, "world") :| [(4, "!"), (1, "Hello")]
    (1,"Hello") :| [(2,"world"),(4,"!")]
    
    >>> sortOn length $ "jim" :| ["creed", "pam", "michael", "dwight", "kevin"]
    "jim" :| ["pam","creed","kevin","dwight","michael"]
    

    Performance notes

    This function minimises the projections performed, by materialising the projections in an intermediate list. For trivial projections, you should prefer using sortBy with comparing, for example:
    >>> sortBy (comparing fst) $ (3, 1) :| [(2, 2), (1, 3)]
    (1,3) :| [(2,2),(3,1)]
    
    Or, for the exact same API as sortOn, you can use `sortBy . comparing`:
    >>> (sortBy . comparing) fst $ (3, 1) :| [(2, 2), (1, 3)]
    (1,3) :| [(2,2),(3,1)]
    
    sortWith is an alias for `sortBy . comparing`.

  10. sortWith :: Ord o => (a -> o) -> NonEmpty a -> NonEmpty a

    base-compat-batteries Data.List.NonEmpty.Compat

    sortWith for NonEmpty, behaves the same as:

    sortBy . comparing
    

Page 24 of many | Previous | Next