Scary Terms for Simple(ish) Things.

One of the interesting things as I learn bits and pieces of functional code in Swift is that I often am using a concept before I know the right technical terms for it.

A perfect example of that is a “Functor.” I’ve been using functors since before Swift was announced and didn’t even know it. A functor is an object that implements map, which is used to apply a transforming function to objects within a context like an array without disturbing the context itself. I picked it up as a useful trick when writing Ruby code, and was thrilled to see map was a part of Swift, but didn’t have any real idea of what the functional vocabulary behind that was.

I gave the last presentation at the Boston Swift Book Club last night delving deep into some of that vocabulary last night. For anyone interested in really digging in, the playground that contains the basics of my full presentation is on github.