DEV Community

Discussion on: Why is map called map?

Collapse
 
johnkazer profile image
John Kazer

I would also add that programming adds to the original mathematics (without mentioning algebraic data structures) by enabling a data structure, such as an array, to be "mappable". That is, the data structure should support certain functions/methods which enable the map function to operate.

The details of course vary by language, but are crucial in enabling a generic map function to work with arrays, linked lists, trees, graphs, sets etc. So for Clojure, any data structure can be mapped if it implements 'first', 'rest' and 'cons'.