[plt-scheme] "Standard" coroutine library suitable for building filters as well as generators
On 04/05/2010 12:17 PM, Scott McLoughlin wrote:
> I think the term is "fully asymmetric" coroutines, but please correct
> me if I'm wrong. I'm not look for just Python style generators, but
> a much more robust coroutine implementation.
>
> I'm looking for a fairly "canonical, full" coroutine implementation,
> where a "yield" like operator can work at activation levels other
> than just the top level, and where a "yield" style operator can
> function as both a LHS or RHS operator (or two separate operators),
> facilitating sending values to a coroutine in a "filter chain" style
> structured program.
>
I'm not exactly sure what you mean by "work at activation levels other
than just the top level" but the scheme/generator library lets you send
values back through the `yield' operator.
http://docs.plt-scheme.org/reference/sequences.html?q=generator#(form._((lib._scheme/generator..ss)._generator))