| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

Using Functional Programming

Page history last edited by Steve Suehs 14 years, 1 month ago

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.