hx-0.1: Utility functions that some may feel are missing from Prelude and base.

Safe HaskellSafe-Inferred

Haskell.X

Synopsis

Documentation

exhaustively :: Eq a => (a -> a) -> a -> aSource

Apply a function exhaustively.

exhaustivelyBy :: (a -> a -> Bool) -> (a -> a) -> a -> aSource

Apply a function exhaustively.

exhaustivelyM :: (Eq a, Monad m) => (a -> m a) -> a -> m aSource

Apply a monad function exhaustively.

exhaustivelyByM :: Monad m => (a -> a -> Bool) -> (a -> m a) -> a -> m aSource

Apply a monad function exhaustively.

uniqSort :: Ord a => [a] -> [a]Source

Sort a list and leave out duplicates. Like nub . sort but faster.

aggregateBy :: (a -> a -> Ordering) -> [a] -> [[a]]Source

Sort, then group

aggregate :: Ord a => [a] -> [[a]]Source

Sort, then group

aggregateAL :: Ord a => [(a, b)] -> [(a, [b])]Source

Aggregate an association list, such that keys become unique.

(c)

tr :: Eq a => a -> a -> [a] -> [a]Source

Replace all occurences of a specific thing in a list of things another thing.