Stream operations fall into two main categories, intermediate and terminal operations, and two sub-categories, stateless and stateful.
Intermediate Operations:
An intermediate operation is always lazy, such as a simple Stream.map. It is not invoked until the stream is actually consumed. This can...