map* for Data.List

Neil Mitchell ndmitchell at
Sat Nov 4 19:08:24 EST 2006


> -- |Map various parts of list
> mapHead f []      =  []
> mapHead f (x:xs)  =  f x : xs

concatMap is concat and map
intercat/consperse is concat and intersperse
mapSnd is map and snd

surely if you heard of mapHead, then you'd expect it to be defined as:

mapHead = map head



More information about the Libraries mailing list