By Alvin Alexander. Last updated: May 24, 2020
I’ve written this before, but when I saw this “pseudocode to Scala code” example in the book Functional Thinking, I thought it was worth mentioning again: If you have trouble grokking the Scala map
method, think of it as being named transform
instead. It transforms an input collection to an output collection, based on the algorithm you supply.
For those coming from the OOP world, I think “transform” is a better word because it is more meaningful, at least initially.