
On 05/20/2013 10:41 PM, Carter Schonwald wrote:
could you elaborate on the other useful generalizations please? :-)
Sorry, I made yet another mistake. The implementation and type should be: mapM :: (a -> m b) -> ListT m a -> ListT m b mapM f m = m >>= lift . f That will not leak and is almost always what people actually want when they use `mapM`, whether or not they use `pipes` to implement `ListT`. It also obeys a different set of functor laws: mapM return = id mapM (f >=> g) = mapM f . mapM g Anyways, sorry for the spam. This is just to show that there are many ways you can generalize something and `Foldable`/`Traversable` are not the last word.
On Tue, May 21, 2013 at 1:41 AM, Gabriel Gonzalez
mailto:gabriel439@gmail.com> wrote: I want to apologize to wren (and everybody else). I was tired and overreacted when the discussion started veering into making more breaking changes.
I don't mind the Foldable changes too much. My main concerns are:
* loss of monomorphism makes teaching more difficult * They can be generalized in other useful ways
However, I don't consider those concerns show-stoppers.
_______________________________________________ Libraries mailing list Libraries@haskell.org mailto:Libraries@haskell.org http://www.haskell.org/mailman/listinfo/libraries