Stupid pet tricks: functions as state

I actually think that we can do some Y-combinator-like trickery here to create a closure that, when called, returns new versions of itself that include updated data.

Not that that would be extremely useful, probably, since it would indeed mostly make introspection difficult. :sweat_smile:


@aseigo Thanks for sharing this technique though! I am wondering currently if it is possible to use some more higher-level stream combinators instead of writing out the recursion of `next_batch manually; this might improve readability. I’ll give it a try.