Learn how to transition to functional-style programming using the new language features in Java 9, including lambdas and the streams framework.
Overview
Syllabus
1. Introducing Functional Programming
- The course overview
- Installation and setup
- What is functional programming?
- Interfaces get a boost
- Some interfaces are more functional than others
- Writing your first lambda expression
- Typing lambda expressions
- Capturing values
- Method references
- Pre-existing functional interfaces
- New functional interfaces
- Functional interfaces for primitive types
- Composing functions
- Comparing streams, collections, and iterators
- Creating a stream
- Understanding lazy evaluation
- Streams as monads
- Filtering stream elements
- Transforming and rearranging stream elements
- Basic terminal operations
- Reductions and collectors
- Streams of primitive types
- Recognizing and avoiding statefulness and side effects
- Using parallel streams
- Looking under the hood: The fork/join framework
- 2D collision detection
- Two-phase collision detection
Taught by
Marco Faella