Creates a sink reducing the stream to a single value without an initial value.
The type of items in the stream
The function to combine the accumulator with each item
A sink that reduces the stream to a single value, the first item for singleton streams, or undefined for empty streams
undefined
Creates a sink reducing the stream to a single value with an initial value.
The type of the accumulated result
The initial value for the accumulator
A sink that reduces the stream to a single value
Creates a sink reducing the stream to a single value without an initial value.