This course takes advantage of functional programming to make the most of the Scala programming language. In essence, it offers a deep dive into basic functional programming topics, such as algebraic data types, higher-order functions and type classes. In particular, it shows how higher-order functions deprecate for-loops and vars, how they help in error handling and asynchronous programming, and how inheritance and adapters can be superseded by type classes.
AUDIENCE
- Programmers with some preliminary exposure to the language willing to get a deep dive into Scala from the functional perspective
COURSE OUTLINE (16 hours)
MODULE 1. Functions and Algebraic data types
- Functions in Scala
- Sum and product types
- Type-driven development
MODULE 2. Higher-order functions
- Higher-order functions (HOFs)
- HOFs in the Scala standard library
- Catamorphisms
MODULE 3. Higher-order functions (II)
- Error handling with Either
- Applicative programming with Validated
- Asynchronous programming with Future
- Dependency injection with Reader
MODULE 4. Type classes
- Type classes & object-oriented patterns
- Type classes in the Scala standard library
- Property-based testing