3 ms·
Sure, as long as I can close over a yield object. There is no reason for filter and map to know that the last function parameter takes a continuation.
by gpderetta 3y ago
Sure, as long as I can close over a yield object. There is no reason for filter and map to know that the last function parameter takes a continuation.
- uhura 3y agoBut then, how could you guarantee type safety? This yield is not an object, it is handling the execution context to another stack.
- gpderetta 3y agoIt is a delimited one-shot continuation. Delimited continuations are first class objects like any other and it should be possible to close over them.