Portability | Portable (Cookbook) |
---|---|
Stability | Stable |
Maintainer | nathanpisarski@gmail.com |
Safe Haskell | Safe-Inferred |
Library for modifying data within a list, and transforming lists in certain ways. While that's vague, so is the definition of To Modify.
- rev :: [a] -> [a]
- rm :: Eq a => [a] -> a -> [a]
- splitOn :: Eq a => [a] -> a -> [[a]]
- between :: Eq a => [a] -> (a, a) -> [a]
- linesBetween :: Eq a => [[a]] -> ([a], [a]) -> [[a]]
- intersperse :: [a] -> a -> [a]
- (?) :: a -> a -> Bool -> a
- surroundedBy :: Eq a => [a] -> (a, a) -> [[a]]
Documentation
rm :: Eq a => [a] -> a -> [a]Source
Removes all occurances of an element from a list. See MDN1 in the source for a run-down on why it's implemented here and in Continuous.
splitOn :: Eq a => [a] -> a -> [[a]]Source
Splits a list on an element, making a list of lists based on the element as a seperator.
linesBetween :: Eq a => [[a]] -> ([a], [a]) -> [[a]]Source
Implementation of between that works on a list of lists, and using Contains rather than elem.
intersperse :: [a] -> a -> [a]Source
Put an element after every element of a list, not including the last element.
surroundedBy :: Eq a => [a] -> (a, a) -> [[a]]Source
Returns a list of all elements surrounded by elements. Basically a between which works more than once.