-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Utility functions that some may feel are missing from Prelude and base. -- -- Utility functions that some may feel are missing from Prelude and -- base. -- -- Some functions are taken from the package hinduce-missingh, -- which was written by Robert Hensing and published under the BSD -- 3-clause license. @package hx @version 0.2 module Haskell.X -- | Apply a function exhaustively. exhaustively :: Eq a => (a -> a) -> a -> a -- | Apply a function exhaustively. exhaustivelyBy :: (a -> a -> Bool) -> (a -> a) -> a -> a -- | Apply a monad function exhaustively. exhaustivelyM :: (Eq a, Monad m) => (a -> m a) -> a -> m a -- | Apply a monad function exhaustively. exhaustivelyByM :: Monad m => (a -> a -> Bool) -> (a -> m a) -> a -> m a -- | Sort a list and leave out duplicates. Like nub . sort but -- faster. uniqSort :: Ord a => [a] -> [a] -- | Sort, then group aggregateBy :: (a -> a -> Ordering) -> [a] -> [[a]] -- | Sort, then group aggregate :: Ord a => [a] -> [[a]] -- | Aggregate an association list, such that keys become unique. -- -- (c) aggregateAL :: Ord a => [(a, b)] -> [(a, [b])] -- | Replace all occurences of a specific thing in a list of things another -- thing. tr :: Eq a => a -> a -> [a] -> [a] -- | Counts how many elements there are in a 4 levels deep list. count4 :: [[[[a]]]] -> Int -- | Counts how many elements there are in a 3 levels deep list. count3 :: [[[a]]] -> Int -- | Counts how many elements there are in a 2 levels deep list. count2 :: [[a]] -> Int -- | Counts how many elements there are in a 1 level deep list. count1 :: [a] -> Int -- | Segments the elements of a 3 levels deep list such that the segments -- contain at least the specified amount of elements, without breaking -- apart any subsegments. segment3 :: Int -> [[[a]]] -> [[a]] -- | Segments the elements of a 2 levels deep list such that the segments -- contain at least the specified amount of elements, without breaking -- apart any subsegments. segment2 :: Int -> [[a]] -> [[a]]