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

Safe HaskellSafe-Inferred

Cookbook.Essential.Common

Synopsis

Documentation

sub :: Eq a => [a] -> Int -> [a]Source

Returns a new list starting at a position. List positions start at 0.

positions :: Eq a => [a] -> a -> [Int]Source

Finds every occurence of an element within a list, starting at position 0.

pos :: Eq a => [a] -> a -> IntSource

Interface to position for finding the position of the first occurence in a list.

apply :: [a -> a] -> a -> aSource

Apply a list of functiosn to one value, using the result from the function beforehand.

flt :: [[a]] -> [a]Source

Flatten a list one level.

fromLast :: ([a] -> [a]) -> [a] -> [a]Source