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

Language | Haskell2010 |

Bidirectional version of Data.List and other operations over lists.

- cons :: Maybe (a, [a]) <-> [a]
- uncons :: [a] <-> Maybe (a, [a])
- consMaybe :: (Maybe a, [a]) <-> [a]
- repLen :: Int <-> [()]
- map :: (a <-> b) -> [a] <-> [b]
- reverse :: [a] <-> [a]
- transpose :: [[a]] <-> [[a]]
- lookup :: (Eq a, Eq b) => [(a, b)] -> Maybe a <-> Maybe b
- index :: Eq a => [a] -> Maybe a <-> Maybe Int
- zip :: ([a], [b]) <-> [(a, b)]
- zip3 :: ([a], [b], [c]) <-> [(a, b, c)]
- zip4 :: ([a], [b], [c], [d]) <-> [(a, b, c, d)]
- zip5 :: ([a], [b], [c], [d], [e]) <-> [(a, b, c, d, e)]
- zip6 :: ([a], [b], [c], [d], [e], [f]) <-> [(a, b, c, d, e, f)]
- zip7 :: ([a], [b], [c], [d], [e], [f], [g]) <-> [(a, b, c, d, e, f, g)]
- zipWith :: ((a, b) <-> c) -> ([a], [b]) <-> [c]
- interleave :: ([a], [a]) <-> [a]
- lines :: String <-> [String]
- words :: String <-> [String]

# Documentation

cons :: Maybe (a, [a]) <-> [a] Source #

Convert between

and the non-empty list `Just`

(head, tail)`head:tail`

.

zip7 :: ([a], [b], [c], [d], [e], [f], [g]) <-> [(a, b, c, d, e, f, g)] Source #

`zip7`

seven lists together.

zipWith :: ((a, b) <-> c) -> ([a], [b]) <-> [c] Source #

`zipWith`

two lists together using a bijection.

interleave :: ([a], [a]) <-> [a] Source #

(Un)interleave two lists, e.g., between `([2,5,11],[3,7])`

and `[2,3,5,7,11]`

.