papa-prelude-semigroups-0.0.1: Prelude with only useful functions

Safe HaskellSafe
LanguageHaskell2010

Papa.Prelude.Semigroups.Data.List

Synopsis

Documentation

maximum :: Ord a => NonEmpty a -> a Source #

minimum :: Ord a => NonEmpty a -> a Source #

(++) :: Semigroup a => a -> a -> a Source #

mappend :: Semigroup a => a -> a -> a Source #

foldr1 :: (a -> a -> a) -> NonEmpty a -> a Source #

foldl1 :: (a -> a -> a) -> NonEmpty a -> a Source #

foldl1' :: (a -> a -> a) -> NonEmpty a -> a Source #

scanr :: Foldable f => (a -> b -> b) -> b -> f a -> NonEmpty b #

scanr is the right-to-left dual of scanl. Note that

head (scanr f z xs) == foldr f z xs.

scanl :: Foldable f => (b -> a -> b) -> b -> f a -> NonEmpty b #

scanl is similar to foldl, but returns a stream of successive reduced values from the left:

scanl f z [x1, x2, ...] == z :| [z `f` x1, (z `f` x1) `f` x2, ...]

Note that

last (scanl f z xs) == foldl f z xs.