Proposal: Add concatMapM function (#2042)

apfelmus apfelmus at quantentunnel.de
Mon Jan 14 17:42:49 EST 2008


Yitzchak Gale wrote:
> One point to consider - perhaps nowadays the type ought to
> be:
> 
> concatMapM :: (Monad m, Traversable t) => (a -> m (t b)) -> t a -> m (t b)

I don't think that works in such generality since that would imply

   join :: Traversable t => t (t c) -> t c
   join = runIdentity . concatMapM return

(set  a = t c  and  b = c ).


Regards,
apfelmus



More information about the Libraries mailing list