isEmpty

first

Returns the first element in the Flow. Returns null for empty flows, but remember that null
is a valid element within a flow, so use isEmpty() to determine if a flow is actually
empty. The first element can be realized without realizing the full Flow.

concat

reduce

Applies a Reducer to the values of the Flow. The Reducer is passed the initial value
and the first element from the Flow. The result is captured as the accumulator and passed
to the Reducer with the next value from the Flow, and so on. The final accumulator
value is returned. If the flow is empty, the initial value is returned.

Reducing is a non-lazy operation; it will fully realize the values of the Flow.