Creates a task taking only the first n items from the stream.
Items are processed sequentially and output order is preserved.
The type of items in the stream
The maximum number of items to take (negative values treated as zero)
A task that takes the first n items
Creates a task taking only the first n items from the stream.
Items are processed sequentially and output order is preserved.