non-empty-0.0: 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.

Documentation

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

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

scanl :: (a -> b -> a) -> a -> [b] -> T [] aSource

genericScanl :: Foldable f => (a -> b -> a) -> a -> f b -> T [] aSource

insertBy :: Sort f => (a -> a -> Ordering) -> a -> f a -> T f aSource

insert :: (Ord a, Sort f) => a -> f a -> T f aSource

appendLeft :: (Append f, View f, Cons f) => f a -> T f a -> T f aSource

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

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

appendRight :: Append f => T f a -> f a -> T f aSource