Silicon Valley Code Camp : October 6th and 7th, 2012session
From Monads to Applicative Programming
About This Session
Monads is the proven way to build total code (the one that does not throw up when it encounters an exceptional situation); the problem with monads they don't compose.
Applicative Functors are a weaker form of monad, and they provide robust and parallelizable calculation framework; map/reduce is one popular example of applicative functors in practice.
In this talk I demonstrate refactoring from traditional-style code to applicative style.
I start with Java samples, but then gradually switch to Scala, since it provides the proper language infrastructure.
MacBride and Paterson's paper, "Functional Pearls" is the source of code examples.
Born in Russia. Mathematician by education, programmer by profession and hobby. Spent 7 years at Borland, over 3 years at Google. Currently an avid Scala programmer. Also I teach Logic at Santa Clara University.