
5 Nov
2006
5 Nov
'06
5:25 a.m.
"J. Garrett Morris"
On 11/4/06, Neil Mitchell
wrote: mapSnd is map and snd
Actually, mapSnd is ($) and snd, which is why I always preferred the names from Control.Arrow (first and second) -- they don't include a reference to a fictional mapping operation.
Well, you could call it fmapSnd if you preferred, using fmap at the identity instance of Functor. The concept of map (fmap) is more general than just lists! It is about type conversion (a->b) embedded through all relevant locations in a data structure. Regards, Malcolm