How to Not Write a For Loopand other stories
Ivan TowlsonMindscape
Erik Meijer
Confessions of a Used Programming Language Salesman
“Functional programming has finally reached the masses, except that it is calledVisual Basic 9 instead of Haskell 98.”
Mads Torgersen
Foreword to Petricek, Real World Functional Programming
“Functional programming is a state of mind.”
Free your mindand your programs will follow
with apologies to Funkadelic
It’s a functional world, Codemaniacs.Let’s go exploring!
with apologies to Bill Watterson
What is the value of a conditional?
Control constructs
What is the value of a for loop?
Control constructs
A
M
F
E
M F A
Generalising conditionals
Programming by cases
Statements expressions
Loops filter / map / expand / fold
Cases pattern matching
Imperative mind,functional mind
Statements expressions
Imperative mind,functional mind
What are the steps to carry out the calculation?
What is the value of the
calculation?
Statements expressions
Loops filter / map / expand / fold
Cases pattern matching
Imperative mind,functional mind
Composable
Self-documenting
Calling out similarities
Calling out differences
Imperative mind,functional mind
Petricek, “Real World Functional Programming in F# and C#” (Manning)
FSharpx project (GitHub)
Resources
Thanks!
Ivan [email protected]://mindscapehq.com/blog/[email protected]://hestia.typepad.com/flatlander/