Few people that work in the financial world actually live in the now.
Some live at the last month end; others at 't-1'.
Only silicon, mad men and chattering Tweeters live on the edge.
represents the current stream of prices for Tesla.
is the current stream of prices sampled at a second apart.
will return a minute's worth of prices sampled every second.
Perhaps you don't want to double count illiquid prices?
Or... 60 unique prices, however long it takes?
Filters, maps etc. you get the idea - dead simple.
At first I thought asynchronicity and laziness wouldn't mix.
Laziness would cause all the asynchronous calls to be executed last minute.
However I really enjoy throwing around asynchronous calls in a symbolical fashion; manipulate them and then as soon as available the data flows through.
I haven't quite straightened out the 'Lazy-Async nexus' just yet - but the end product has been satisfying so far.
Code is here.