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

Safe HaskellSafe-Inferred

Cookbook.Ingredients.Tupples.Look

Synopsis

Documentation

look :: Eq a => [(a, b)] -> a -> Maybe bSource

Returns the second element of the first tupple where the first element matches input.

lookList :: Eq a => [(a, b)] -> a -> [b]Source

Returns all second elements where (fst t) matches the input.

swp :: (a, b) -> (b, a)Source

Swap the order of a second-degree tupple.

rmLook :: Eq a => [(a, b)] -> a -> [(a, b)]Source

Reverse this.look. Will remove any matches.

group :: [a] -> [(a, a)]Source

Turn a list into as many bifold tupples as possible.