The Using thread-safe navigable maps recipe in this chapter The Reducing the elements of a stream recipe in Chapter 6, Parallel and Reactive Streams