Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Synopsis
- writeError :: String -> IO ()
- mapBoth :: (a -> a) -> (a, a) -> (a, a)
- mapPartTimes :: (a -> a) -> ((a, a), (a, a)) -> ((a, a), (a, a))
- mapFst :: (a -> b) -> (a, c) -> (b, c)
- mapSnd :: (a -> b) -> (c, a) -> (c, b)
- delta :: Num a => (a, a) -> a
- mid :: Fractional a => (a, a) -> a
- removeCommon :: Eq a => [a] -> [a] -> ([a], [a])
- readMaybe :: Read a => String -> Maybe a
- (!!!) :: [a] -> Int -> a
- nth :: Int -> [a] -> Maybe a
- accumulate :: Num t => [t] -> [t]
- enumerate :: [a] -> [(Int, a)]
- wordsBy :: (a -> Bool) -> [a] -> [[a]]
- deltaMini :: String -> String
Documentation
writeError :: String -> IO () Source #
mapPartTimes :: (a -> a) -> ((a, a), (a, a)) -> ((a, a), (a, a)) Source #
mid :: Fractional a => (a, a) -> a Source #
The midpoint of two values
removeCommon :: Eq a => [a] -> [a] -> ([a], [a]) Source #
(!!!) :: [a] -> Int -> a Source #
like !!
selects n
th element from xs, but wraps over at the end of xs
>>>
map ((!!!) [1,3,5]) [0,1,2,3,4,5]
[1,3,5,1,3,5]
accumulate :: Num t => [t] -> [t] Source #
enumerate :: [a] -> [(Int, a)] Source #
enumerate a list of things
>>>
enumerate ["foo","bar","baz"]
[(1,"foo"), (2,"bar"), (3,"baz")]