deferred-folds-0.3: Abstractions over deferred folds

Safe HaskellNone
LanguageHaskell2010

DeferredFolds.FoldlMView

Synopsis

Documentation

newtype FoldlMView m input Source #

A monadic variation of DeferredFolds.FoldView

Constructors

FoldlMView (forall output. (output -> input -> m output) -> output -> m output) 

Instances

Monad m => Monad (FoldlMView m) Source # 

Methods

(>>=) :: FoldlMView m a -> (a -> FoldlMView m b) -> FoldlMView m b #

(>>) :: FoldlMView m a -> FoldlMView m b -> FoldlMView m b #

return :: a -> FoldlMView m a #

fail :: String -> FoldlMView m a #

Functor m => Functor (FoldlMView m) Source # 

Methods

fmap :: (a -> b) -> FoldlMView m a -> FoldlMView m b #

(<$) :: a -> FoldlMView m b -> FoldlMView m a #

Monad m => Applicative (FoldlMView m) Source # 

Methods

pure :: a -> FoldlMView m a #

(<*>) :: FoldlMView m (a -> b) -> FoldlMView m a -> FoldlMView m b #

liftA2 :: (a -> b -> c) -> FoldlMView m a -> FoldlMView m b -> FoldlMView m c #

(*>) :: FoldlMView m a -> FoldlMView m b -> FoldlMView m b #

(<*) :: FoldlMView m a -> FoldlMView m b -> FoldlMView m a #

Monad m => Alternative (FoldlMView m) Source # 

Methods

empty :: FoldlMView m a #

(<|>) :: FoldlMView m a -> FoldlMView m a -> FoldlMView m a #

some :: FoldlMView m a -> FoldlMView m [a] #

many :: FoldlMView m a -> FoldlMView m [a] #

Monad m => MonadPlus (FoldlMView m) Source # 

Methods

mzero :: FoldlMView m a #

mplus :: FoldlMView m a -> FoldlMView m a -> FoldlMView m a #

Monad m => Semigroup (FoldlMView m a) Source # 

Methods

(<>) :: FoldlMView m a -> FoldlMView m a -> FoldlMView m a #

sconcat :: NonEmpty (FoldlMView m a) -> FoldlMView m a #

stimes :: Integral b => b -> FoldlMView m a -> FoldlMView m a #

Monad m => Monoid (FoldlMView m a) Source # 

Methods

mempty :: FoldlMView m a #

mappend :: FoldlMView m a -> FoldlMView m a -> FoldlMView m a #

mconcat :: [FoldlMView m a] -> FoldlMView m a #

foldl' :: (output -> input -> output) -> output -> FoldlMView Identity input -> output Source #

Perform a strict left fold

foldlM' :: Monad m => (output -> input -> m output) -> output -> FoldlMView m input -> m output Source #

Perform a monadic strict left fold

fold :: Fold input output -> FoldlMView Identity input -> output Source #

Apply a Gonzalez fold

foldM :: Monad m => FoldM m input output -> FoldlMView m input -> m output Source #

Apply a monadic Gonzalez fold

foldable :: (Monad m, Foldable foldable) => foldable a -> FoldlMView m a Source #

Construct from any foldable

intsInRange :: Monad m => Int -> Int -> FoldlMView m Int Source #

Ints in the specified inclusive range