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.

For "ListT done right", how about:

concatM :: Monad m => [ListT m a] -> List m a
concatM = join . liftList

(http://www.haskell.org/haskellwiki/ListT_done_right)

Regards,
Yitz
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to