C9 Lectures: Dr. Erik Meijer - Functional Programming Fundamentals Chapter 6 of 13
- Posted: Nov 05, 2009 at 7:53AM
- 66,949 views
- 25 comments
Loading user information from Channel 9
Something went wrong getting user information from Channel 9
Loading user information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
Right click “Save as…”
In Chapter 6, Dr. Meijer guides us through the world of recursive functions. In Haskell, functions can be defined in terms of themselves. Such functions are called recursive.
factorial 0 = 1
factorial (n+1) = (n+1) * factorial n
factorial maps 0 to 1, and any other positive integer to the product of itself and the factorial of its predecessor.
Some functions, such as factorial, are simpler to define in terms of other functions. As we shall see, however, many functions can naturally be defined in terms of themselves.
Properties of functions defined using recursion can be proved using the simple but powerful mathematical technique of induction.
You should watch these in sequence (or skip around depending on your curent level of knowledge in this domain):