Tuesday, 28 May 2013

f(x) = y

I think I’m getting to fully understand “map”. (Source of much prior consternation.)  In the carefully crafted introduction to what it is to be a Functional Program, Nilanjan Raychaudhuri (Scala in Action, Chapter 1) introduces the following:

x has a relationship f with y

which can also be stated as:

x maps to y via f

All of a sudden, in two simple statements, “map” has been used as a verb, in a way which seems memorable to me, and more importantly, in the same way that it’s used in the Scala “map” function.  That counts as a first piton in my book. A good solid one.