non-empty-0.1.1: List-like structures with static checks on the number of elements

Safe HaskellNone

Data.NonEmpty.Mixed

Description

Functions that cope both with plain and non-empty structures.

If there are two versions of a function, where one works on fixed-length lists, the place the fixed-length list variant to NonEmpty and the other one here.

Documentation

groupBy :: Foldable f => (a -> a -> Bool) -> f a -> [T [] a]Source

segmentBefore :: Foldable f => (a -> Bool) -> f a -> ([a], [T [] a])Source

mapAdjacent :: (Cons f, Zip f) => (a -> a -> b) -> T f a -> f bSource

tails :: (View f, Empty f) => f a -> T [] (f a)Source

inits :: (View f, Cons f, Empty f) => f a -> T [] (f a)Source

appendLeft :: Cons f => [a] -> f a -> f aSource