Iavor Diatchki iavor.diatchki at
Thu Mar 2 13:32:02 EST 2006

The library looks nice. I use a number of the operations in the
applicative module (sadly with different names :-).  I was wondering,
why does 'Applicative' introduce a new mapping operator, instead of
inheriting one from 'Functor'?   Also I have mentioned before, that I
think that 'forEach' is a better name for 'mapM' with the arguments
swapped. I find it makes code more readable, but of course this is
just a personal preference.  Other related operators that I find
useful and use quite a bit are:
forEach2 :: Monad m => [a] -> [b] -> (a -> b -> m c) -> m [c] -- (aka zipWithM)
forEach2' :: same type, but uses lazy pattern matching in the second argument.
The second operator is quite useful if the one list is recursively
created, and it is important
that it is not forced too early.  Do you think at least 'forEach2'
should also be in the 'Traversable' class, or does it perhaps belong
to some other class?

On 3/2/06, Ross Paterson <ross at> wrote:
> I propose to deprecate Data.FunctorM in favour of Data.Traversable:
> _______________________________________________
> Libraries mailing list
> Libraries at

More information about the Libraries mailing list