| Copyright | (c) Andy Gill 2001 (c) Oregon Graduate Institute of Science and Technology 2001 |
|---|---|
| License | BSD-style (see the file LICENSE) |
| Maintainer | libraries@haskell.org |
| Stability | experimental |
| Portability | portable |
| Safe Haskell | Safe |
| Language | Haskell2010 |
Control.Monad.List
Description
The List monad.
Synopsis
- newtype ListT (m :: * -> *) a = ListT {
- runListT :: m [a]
- mapListT :: (m [a] -> n [b]) -> ListT m a -> ListT n b
- module Control.Monad
- module Control.Monad.Trans
Documentation
newtype ListT (m :: * -> *) a #
Parameterizable list monad, with an inner monad.
Note: this does not yield a monad unless the argument monad is commutative.
Instances
Instance details
Methods
throwError :: e -> ListT m a Source #
catchError :: ListT m a -> (e -> ListT m a) -> ListT m a Source #
Instance details
Methods
fold :: Monoid m => ListT f m -> m #
foldMap :: Monoid m => (a -> m) -> ListT f a -> m #
foldr :: (a -> b -> b) -> b -> ListT f a -> b #
foldr' :: (a -> b -> b) -> b -> ListT f a -> b #
foldl :: (b -> a -> b) -> b -> ListT f a -> b #
foldl' :: (b -> a -> b) -> b -> ListT f a -> b #
foldr1 :: (a -> a -> a) -> ListT f a -> a #
foldl1 :: (a -> a -> a) -> ListT f a -> a #
elem :: Eq a => a -> ListT f a -> Bool #
maximum :: Ord a => ListT f a -> a #
minimum :: Ord a => ListT f a -> a #
Instance details
module Control.Monad
module Control.Monad.Trans