Understanding streams
The best way to understand streams is to ignore data and think about water for a moment. Imagine you are in a room in which a pipe with a faucet enters through one wall. Your job is to build a device that will collect the water from the pipe. There is obviously something connected to the other end of the pipe that produces the water, but you are only able to see the faucet, and so the design of your device will be dictated by what you know: you have to create something that will connect to the pipe and receive the water when the faucet is turned on. Having such a limited view of the system you are working with may feel like a restriction, but the pipe can be connected to any source of water and your device works just as well whether the water comes from a river or a reservoir; it is all just water coming through the pipe via the faucet, and it is always consumed consistently.
At the other end of the pipe, the producer of the water has a pipe into which they...