18 May 16:05
Re: Std lib equivalent for liftM concat . sequence
Yitzchak Gale <gale <at> sefer.org>
2008-05-18 14:05:19 GMT
2008-05-18 14:05:19 GMT
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
RSS Feed