How about incrementally combine?
I constructed an even more basic example (it's at the same sprite):
with:
Groovy; do you like the version with colored text?
I'll think it over some more.
Hmm, that's a good solution from an efficiency standpoint, but I'm afraid it may confuse them. I really want ITEM ((#)-1) OF STREAM (which could be implemented with a bounded history list internally if you like).
It's not just from an efficiency point of view - referring to history from the current item down (let's call it: hindsight
, actually suggesting a reverse view) feels so much more natural to me. When you are e.g. at item 100 of a stream, either all of the previous items are relevant, or none, or just a few recent ones, but never just items 1/2/3 ... - or do you know of a counter example?
Huh. You're folding right to left, which is fine.
I copied your code proposal for interleave
, didn't I? However that may be, I still don't like the unintended effect of
combine (streams ...) using (interleave () () )
, resulting in an uneven distribution of output items between input streams. So I'm including the variadic interleave many streams
(not in palette) as a demo example in the edit window (and using your suggested (data) followed by (value)
, even though I find that a bit awkward).
Right, I may have forgotten that, late at night, but I'd really prefer a name such as PARTIAL SORT OF LIST _ USING STREAMS or something. Maybe that's overkill. The key point is "list" in the name
I'm using stream of smallest items from list
now.