Re: [Haskell-cafe] concatMap generalizes to msumMap?

2005-05-16 Thread David Menendez
S. Alexander Jacobson writes: > I don't think that is right. concatMap has definition > >concatMap :: (a -> [b]) -> [a] -> [b] >concatMap f xs = concat $ map f xs > > Therefore: > >msumMap :: (MonadPlus m) => (a1 -> m a) -> [a1] -> m a >msumMap f list = msum $ fmap f list Assu

Re: [Haskell-cafe] concatMap generalizes to msumMap?

2005-05-16 Thread Tomasz Zielonka
On Mon, May 16, 2005 at 03:20:25PM -0400, S. Alexander Jacobson wrote: > I don't think that is right. concatMap has definition > > concatMap :: (a -> [b]) -> [a] -> [b] > concatMap f xs = concat $ map f xs > > Therefore: > > msumMap :: (MonadPlus m) => (a1 -> m a) -> [a1] -> m a > msumM

Re: [Haskell-cafe] concatMap generalizes to msumMap?

2005-05-16 Thread S. Alexander Jacobson
I don't think that is right. concatMap has definition concatMap :: (a -> [b]) -> [a] -> [b] concatMap f xs = concat $ map f xs Therefore: msumMap :: (MonadPlus m) => (a1 -> m a) -> [a1] -> m a msumMap f list = msum $ fmap f list In contrast <<= has type (=<<) :: (Monad m) => (a -> m b) -

Re: [Haskell-cafe] concatMap generalizes to msumMap?

2005-05-16 Thread Tomasz Zielonka
On Mon, May 16, 2005 at 02:57:42PM -0400, S. Alexander Jacobson wrote: > What is the name of the monadic generalization of concatMap? (=<<) or simply (>>=) if you don't care about argument order. Probably not what you are after? > In which lib is it located? The former is in module Monad, the la

[Haskell-cafe] concatMap generalizes to msumMap?

2005-05-16 Thread S. Alexander Jacobson
What is the name of the monadic generalization of concatMap? In which lib is it located? -Alex- __ S. Alexander Jacobson tel:917-770-6565 http://alexjacobson.com ___ Haskell-Cafe mailing list Has