Functional programming in R: Part 2
Speeding up the BFDA R package with maps and parallel maps
In Part 1 of this series, I showed how Functional-style code allows you to separate the what and the how of your code, and how doing so opened up new ways of solving programming problems. Part 1 covered the reduce / accumulate family of higher-order functions, and in the current post I cover the apply / map family of higher-order functions. Finally, I show how changing from loops to the apply / map family of higher-order functions parallel programming becomes a trivial matter of slightly modifying a function name.