Did you ever consider solving an equation to write some code? Haskellers sometimes do. Learn about fmap and foldr and then compare what you know to map/reduce.
Did you ever consider solving an equation to write some code? Haskellers sometimes do. Learn about fmap and foldr and then compare what you know to map/reduce.
There's great power in the idea of single assign, and the notion of immutable objects (be it variables, or else) is getting many programmers to rethink their ideas, but saying "this is right because it's like in math" is selling the idea short, and not doing any justice to the strengths of functional programming.
I simply point out this feature because most people focus on language features and this is "programmer feature" that you might not think of if it wasn't pointed it out.
* http://stackoverflow.com/questions/5710078/in-haskell-perfor...
Algebra of Programming FTW!
See Richard Bird (or others at Oxford) for more on this style. E.g. http://lambda-the-ultimate.org/node/1117