Safe Haskell | Safe |
---|---|

Language | Haskell2010 |

## Synopsis

- 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]]

# Documentation

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`

`>>>`

[1,3,5,1,3,5]`map ((!!!) [1,3,5]) [0,1,2,3,4,5]`

accumulate :: Num t => [t] -> [t] Source #