cookbook-3.0.1.1: Tiered general-purpose libraries with domain-specific applications.

Copyright(c) 2014 by Nate Pisarski
LicenseBSD3
Maintainernathanpisarski@gmail.com
StabilityStable
PortabilityPortable (Cookbook)
Safe HaskellSafe
LanguageHaskell98

Cookbook.Ingredients.Lists.Modify

Description

Library for modifying data within a list, and transforming lists in certain ways. While that's vague, so is the definition of "To Modify".

Synopsis

Documentation

rev :: [a] -> [a] Source #

Reverses a list.

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.

(?) :: a -> a -> Bool -> a Source #

An equivelant to the terenary operator for Haskell.

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.