Description
This course will teach you how to use the functional programming style when designing larger Scala applications. You'll learn important new functional programming concepts, such as lazy evaluation and library structuring with monads. We'll work on more complex examples, such as state space exploration, random testing, and discrete circuit simulators. You'll also learn some best practises for writing good Scala code in practise. Finally, you will learn how to take advantage of the compiler's ability to infer values from types.
In this course, you will learn :
- Recognize and apply functional programme design principles.
- Create functional libraries and APIs.
- Create simple reactive functional applications.
- Learn how to use reasoning techniques for programmes that combine functions and state.
Syllabus :
1. For Expressions and Monads
- Recap: Functions and Pattern Matching
- Queries with For
- Translation of For
- Functional Random Generators
- Monads
- Exceptional Monads
2. Lazy Evaluation
- Structural Induction on Trees
- Lazy Lists
- Lazy Evaluation
- Computing with Infinite Sequences
- Case Study: the Water Pouring Problem
3. Type-Directed Programming
- Contextual abstractions
- Using clauses and given instances
- Type classes
- Abstract algebra and type classes
- Context passing
- Implicit function types
4. Functions and State
- Functions and State
- Identity and Change
- Loops
- Extended Example: Discrete Event Simulation
5. Timely Effects
- Imperative Event Handling: The Observer Pattern
- Functional Reactive Programming
- A Simple FRP Implementation