Patrick R. Michaud wrote:
What's the language-agnostic term for this, then?
Well, 'gather' is basically a clever use of a coroutine, and 'take' is basically a 'yield'. But, what's unique about the construct is that it aggregates the results. So, 'gather' is an "aggregating coroutine" and 'take' is an "aggregating yield". To allow for a distinction in the control exception types, call it 'CONTROL_YIELD_AGGREGATE'.
"Aggregating coroutine" and "aggregating yield" aren't nearly as zippy as 'gather' and 'take', but they're more meaningful to a broader audience, which may help the feature spread.
Allison