map* for Data.List

Christian Maeder maeder at
Mon Nov 6 07:41:16 EST 2006

Malcolm Wallace schrieb:
> The concept of map (fmap) is more general
> than just lists! 

Right! It's recursive only for recursive data structures. In the case of
tuples mapping degenerates or falls together with a kind of record
update. Also the proposal for mapHead is a kind of record update,
whereas it is unclear what mapTail should be.

In fact the compiler should be able to systematically generate/derive
update and/or map functions from data types (however such functions
might be named).


More information about the Libraries mailing list