28-03-2011, 09:39 AM
presented by:
Graham Hutton
functional.ppt (Size: 1.23 MB / Downloads: 112)
What is Functional Programming?
z Functional programming is style of programming in which the basic method of computation is the application of functions to arguments;
z A functional language is one that supports and encourages the functional style.
Example
Why is it Useful?
z This Course
What is Hugs?
z An interpreter for Haskell, and the most widely used implementation of the language;
z An interactive system, which is well-suited for teaching and prototyping purposes;
Hugs is freely available from:
z The Standard Prelude
z Function Application
Examples
z My First Script
z Exercises
z What is a Type?
z Types in Haskell
z Basic Types
z List Types
z Tuple Types
z Function Types
z Exercises
z Curried Functions
z Curry Conventions
z The arrow ® associates to the right.
z Polymorphic Types
z Overloaded Types
z Classes in Haskell
z Exercises
z Conditional Expressions
z Guarded Equations
z Pattern Matching
z List Patterns
z Lambda Expressions
z Why Are Lambda's Useful?
z Exercises
z Set Comprehensions
z Lists Comprehensions
z Dependant Generators
z Guards
z Exercises
z Introduction
z Recursive Functions
Why is Recursion Useful?
z Some functions, such as factorial, are simpler to define in terms of other functions;
z In practice, however, most functions can naturally be defined in terms of themselves;
z Properties of functions defined using recursion can be proved using the simple but powerful mathematical technique of induction.
Graham Hutton
functional.ppt (Size: 1.23 MB / Downloads: 112)
What is Functional Programming?
z Functional programming is style of programming in which the basic method of computation is the application of functions to arguments;
z A functional language is one that supports and encourages the functional style.
Example
Why is it Useful?
z This Course
What is Hugs?
z An interpreter for Haskell, and the most widely used implementation of the language;
z An interactive system, which is well-suited for teaching and prototyping purposes;
Hugs is freely available from:
z The Standard Prelude
z Function Application
Examples
z My First Script
z Exercises
z What is a Type?
z Types in Haskell
z Basic Types
z List Types
z Tuple Types
z Function Types
z Exercises
z Curried Functions
z Curry Conventions
z The arrow ® associates to the right.
z Polymorphic Types
z Overloaded Types
z Classes in Haskell
z Exercises
z Conditional Expressions
z Guarded Equations
z Pattern Matching
z List Patterns
z Lambda Expressions
z Why Are Lambda's Useful?
z Exercises
z Set Comprehensions
z Lists Comprehensions
z Dependant Generators
z Guards
z Exercises
z Introduction
z Recursive Functions
Why is Recursion Useful?
z Some functions, such as factorial, are simpler to define in terms of other functions;
z In practice, however, most functions can naturally be defined in terms of themselves;
z Properties of functions defined using recursion can be proved using the simple but powerful mathematical technique of induction.