I can't +1 this enough to express how much I desire that change!

2015-03-13 12:32 GMT+03:00 Fumiaki Kinoshita <fumiexcel@gmail.com>:
A dozen of functions like concat, foldr, mapM, have been generalized through BBP.

Then, why do we leave `map` just for lists? Obviously `map` can be generalized, so

map :: Functor f => (a -> b) -> f a -> f b
map = fmap

The current definition of `map` looks too special to be a special case of mapM (map f = runIdentity . mapM (Identity . f)).

_______________________________________________
Libraries mailing list
Libraries@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries