License | MIT-style (see LICENSE) |
---|---|
Stability | stable |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Various utility bits and pieces.
Synopsis
- io :: MonadIO m => IO a -> m a
- fi :: (Integral a, Num b) => a -> b
- err :: MonadIO m => String -> m ()
- upcase :: String -> String
- downcase :: String -> String
- hsv2rgb :: Fractional a => (Integer, a, a) -> (a, a, a)
- wrap :: String -> String -> String
- quote :: String -> String
- clamp :: Ord a => a -> a -> a -> a
- mapAccumLM :: Monad m => (acc -> x -> m (acc, y)) -> acc -> [x] -> m (acc, [y])
- ifM :: Monad m => m Bool -> m a -> m a -> m a
- divide :: Integral a => a -> a -> [a]
Documentation
hsv2rgb :: Fractional a => (Integer, a, a) -> (a, a, a) Source #
Conversion scheme as in http://en.wikipedia.org/wiki/HSV_color_space
mapAccumLM :: Monad m => (acc -> x -> m (acc, y)) -> acc -> [x] -> m (acc, [y]) Source #
The mapAccumLM
function behaves like a combination of mapM
and
foldlM
; it applies a monadic function to each element of a list,
passing an accumulating parameter from left to right, and returning
a final value of this accumulator together with the new list.