Creates a sink executing a side effect for each item and consuming the stream.
Terminal operation that triggers stream execution.
The type of items in the stream
The function to execute for each item (return value is ignored)
A sink that executes the consumer for each item and returns the number of processed items
await items([1, 2, 3])(forEach(x => console.log(x))); // logs 1, 2, 3; returns 3 Copy
await items([1, 2, 3])(forEach(x => console.log(x))); // logs 1, 2, 3; returns 3
Creates a sink executing a side effect for each item and consuming the stream.
Terminal operation that triggers stream execution.