What is functional programming?
Agenda
- F#! -> C#
- Lazy <T>
- Lazy Eval
- WTF is Map/Reduce
* Functions as first-class citizens of the language
* Immutability
* Avoiding side-effects allows you to trust that a function behaves as a function (the same inputs always result in the same output)
* tuple
* Boils down to the lambda calculus
* closures
* 2nd order and higher order functions
Practice
* Unfolding of a loop
Iinumerable<int> Numbers()
{
int i;
while (true)
yield return i++;
}
Predicate<T>
Func<T,bool>
x => x < 10
for
col.Numbers().Where( x => x < 10)
// refactor if//comment => method
Book Reference: Real World Functional Programming (Manning Press)
Comments (0)
You don't have permission to comment on this page.