
18 May
2008
18 May
'08
10:05 a.m.
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