Skip to content

Glossary: Java Beyond the Basics

flatMap, reduce

Also written: flatMap, reduce

flatMap turns each element into a stream and joins them all into one stream; reduce(start, operation) combines all elements into one value.

Where the book teaches it

Related terms

StreamCollector