Alistair Bayley wrote:
>> concatM :: Monad m => [m [a]] -> m [a]
>> concatM = liftM concat . sequence
Miguel Mitrofanov wrote:
> Seems to be close to
> sequence :: [ListT m a] -> ListT m a
> Hmm?
Yes. It is close to something like that for the old
broken ListT - but let's not talk about that one.
Alistair Bayley wrote:
>> A couple of days ago I had need for:
>> concatM :: Monad m => [m [a]] -> m [a]
>> concatM = liftM concat . sequence
>> but found no such thing in the std libs
It used to be in an older version of Haskell, but
it was removed in Haskell 98.
Bulat Ziganshin wrote:
> 2. it's
Oops, I was very wrong. Sorry.
On 16 May 2008, at 20:13, Miguel Mitrofanov wrote:
Seems to be close to
sequence :: [ListT m a] -> ListT m a
Hmm?
On 16 May 2008, at 14:12, Alistair Bayley wrote:
A couple of days ago I had need for:
concatM :: Monad m => [m [a]] -> m [a]
concatM = liftM co
Seems to be close to
sequence :: [ListT m a] -> ListT m a
Hmm?
On 16 May 2008, at 14:12, Alistair Bayley wrote:
A couple of days ago I had need for:
concatM :: Monad m => [m [a]] -> m [a]
concatM = liftM concat . sequence
but found no such thing in the std libs, except perhaps for msum (I
Hello Alistair,
Friday, May 16, 2008, 2:12:45 PM, you wrote:
>> concatM = liftM concat . sequence
> but found no such thing in the std libs, except perhaps for msum (I
> don't want to add instances for MonadPlus. Should I have to?). Have I
> missed something trivial?
1. it's easy to define your
A couple of days ago I had need for:
> concatM :: Monad m => [m [a]] -> m [a]
> concatM = liftM concat . sequence
but found no such thing in the std libs, except perhaps for msum (I
don't want to add instances for MonadPlus. Should I have to?). Have I
missed something trivial?
Alistair
_