> class FunctorM t where
>      fmapM  :: Monad m => (a -> m b) -> (t a -> m (t b))
>      fmapM_ :: Monad m => (a -> m b) -> (t a -> m ())
>      fmapM_ f t = fmapM f t >> return ()

The `fmapM' function is also known as a monadic map. It can be
defined in a generic way for every Haskell data type. It's in
the library of Generic Haskell (called mapMl):

        http://www.cs.uu.nl/research/projects/generic-haskell/

As an aside, gmap and friends won't fit the bill, as they work
on types rather than functors.

Cheers, Ralf

_______________________________________________
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to