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

Safe HaskellSafe-Inferred

Cookbook.Ingredients.Lists.Encompass

Synopsis

Documentation

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

Get the entire section of a list contained within the scope delimited by the parameters, even sub-scopes.

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

Partial implementation of after, but working with scopes. Dangerous implementation, use with caution.

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

Partial implementation of before, but working with scopes. Less dangerous implementation than afterEncompassing, but still dangerous.

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

Gets all of the elements outside a given scope.

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

There is a long story behind this function, and why it sucks. See ENN1 in the source.

toGaps :: Eq a => [[a]] -> [[a]]Source

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

Returns all of the elements inside of a scope.