Functional collections

Functional collections are collections that offer a way to interact with its elements through high-order functions. Functional collections have common operations with names such as filter, map, and fold; these names are defined by convention (similar to a design pattern) and are being implemented in several libraries and languages.

Don't get confused with purely functional data structures—a data structure implemented in a pure functional language. A purely functional data structure is immutable and uses the lazy evaluation and other functional techniques.

Functional collections can but needn't necessarily be purely functional data structures. We have already covered how imperative implementations of algorithms can be ...

Get Functional Kotlin now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.