Safe Haskell | None |
---|---|
Language | Haskell98 |
General utitlity functions.
- (.::) :: (c -> d) -> (a -> b -> c) -> a -> b -> d
- (.:::) :: (d -> e) -> (a -> b -> c -> d) -> a -> b -> c -> e
- head' :: [a] -> Maybe a
- foldM' :: Monad m => (a -> b -> m a) -> a -> [b] -> m a
- foldlWithKeyM :: Monad m => (b -> k -> a -> m b) -> b -> Map k a -> m b
- foldrWithKeyM :: Monad m => (k -> a -> b -> m b) -> b -> Map k a -> m b
- whenM :: Monad m => m Bool -> m () -> m ()
- catMaybesSet :: Ord a => Set (Maybe a) -> [a]
- isLeft :: Either a b -> Bool
- isRight :: Either a b -> Bool
- fromLeft :: Either a b -> a
- fromRight :: Either a b -> b
- unbox :: [a] -> a
- unboxM :: [a] -> Maybe a
- isSingleton :: [a] -> Bool
- split :: Eq a => [a] -> [a] -> [[a]]
- partitionListByLength :: Int -> [a] -> [[a]]
- partitionListByCount :: Int -> [a] -> [[a]]
- descending :: Ord a => a -> a -> Ordering
- strip :: String -> String
- stripl :: String -> String
- stripr :: String -> String
- stripWith :: (a -> Bool) -> [a] -> [a]
- escape :: String -> String
- showText :: Show a => a -> Text
- object' :: [[Pair]] -> Value
- (.=?) :: ToJSON a => Text -> (a, a -> Bool) -> [Pair]
- (.==) :: ToJSON a => Text -> a -> [Pair]
- (.\.) :: ToJSON a => a -> (a -> Bool) -> (a, a -> Bool)
- data TypeDummy
Function Composition
Safe / Total Functions
Strict Functions
Monadic Functions
foldlWithKeyM :: Monad m => (b -> k -> a -> m b) -> b -> Map k a -> m b Source
foldrWithKeyM :: Monad m => (k -> a -> b -> m b) -> b -> Map k a -> m b Source
Maybe Helper
Either Helper
List Helper
isSingleton :: [a] -> Bool Source
Test if the list contains a single element.
split :: Eq a => [a] -> [a] -> [[a]] Source
Split a string into seperate strings at a specific character sequence.
partitionListByLength :: Int -> [a] -> [[a]] Source
partition the list of input data into a list of input data lists of approximately the same specified length
partitionListByCount :: Int -> [a] -> [[a]] Source
partition the list of input data into a list of a specified number of input data lists with approximately the same length
descending :: Ord a => a -> a -> Ordering Source
To use with sortBy
.
String Helper
stripWith :: (a -> Bool) -> [a] -> [a] Source
Strip leading and trailing elements matching a predicate.