Skip to content

Latest commit

 

History

History
 
 

Chapter08

Functional style programming - Fundamentals and design patterns

Chapter 8 and 9 includes 33 problems that involve Java functional style programming. The chapter starts with a problem meant to provide a complete journey from 0 to functional interfaces. It continues with a suite of design patterns from GoF interpreted in Java functional style. Next, we focus on several problems that involves classical operations encountered in streams (e.g., filter, map, etc), we discuss infinite streams, null-safe streams and default methods. A comprehensive list of problems covers grouping, partitioning, and collectors, including JDK 12 teeing() collector and writing a custom collector. In addition, takeWhile(), dropWhile(), composing functions, predicates
and comparators, testing and debugging lambdas, and other cool topics are discussed as well.