September 2019
Intermediate to advanced
462 pages
11h 3m
English
We mostly use for to program external iterators. But internal iteration involves many specialized tools like filter(), map(), flatMap(), reduce(), and so on. Much like the way a professional mechanic uses different specialized tools to fix a car, and doesn’t settle for just a hammer, in functional programming we use a combination of the right tools for different tasks. The Kotlin standard library provides plenty of higher-order functions for internal iteration. We’ll visit some of the most commonly used functions.
filter(), map(), and reduce() are the three amigos of functional programming; they are fundamental functions used as internal iterators. The filter() function picks certain values from a given ...
Read now
Unlock full access