map* for Data.List

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


Hi

> -- |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
?

Thanks

Neil


More information about the Libraries mailing list