Safe Haskell | None |
---|

similar to GenUtil but can rely on non-haskell 98 features

- mconcatMap :: Monoid a => (a1 -> a) -> [a1] -> a
- mintercalate :: Monoid a => a -> [a] -> a
- mconcatMapM :: (Monad m, Monoid b) => (a -> m b) -> [a] -> m b
- runReadP :: Monad m => ReadP a -> String -> m a
- runEither :: String -> Either String a -> a
- travCollect :: Monoid w => ((a -> Writer w a) -> a -> Writer w a) -> (a -> w) -> a -> w
- forMn_ :: Monad m => [a] -> ((a, Int) -> m b) -> m ()
- forMn :: Monad m => [a] -> ((a, Int) -> m b) -> m [b]
- shortenPath :: String -> IO String
- maybeDo :: Monad m => Maybe (m a) -> m ()
- module GenUtil
- intercalate :: [a] -> [[a]] -> [a]

# Documentation

mconcatMap :: Monoid a => (a1 -> a) -> [a1] -> aSource

mintercalate :: Monoid a => a -> [a] -> aSource

mconcatMapM :: (Monad m, Monoid b) => (a -> m b) -> [a] -> m bSource

travCollect :: Monoid w => ((a -> Writer w a) -> a -> Writer w a) -> (a -> w) -> a -> wSource

shortenPath :: String -> IO StringSource

module GenUtil

intercalate :: [a] -> [[a]] -> [a]

`intercalate`

`xs xss`

is equivalent to `(`

.
It inserts the list `concat`

(`intersperse`

xs xss))`xs`

in between the lists in `xss`

and concatenates the
result.