How to Write a Flux Adaptor Using Coroutines
Todo:
- [ ] Fix date when finished.
$$ T_{over} = p \sum{x} $$
Target Audience
Professional C++ programmers and students/researchers who are familiar with C++.
Goal
-
Provide a resource that details how to write a quick adaptor using coroutines in Flux.
-
Provide working examples version locked on compiler explorer.
Outline
- Quick intro to flux
- Example of sequence oriented programming
- Links to some talks and source
- Basics of coyield
- Explain how cpp implements coroutines, and what it actually means to use a coroutine
- Very basics of writing an adaptor
- We need a resumable function that yields elements in the sequence and returns when complete.
- Writing a simple adaptor using coyield
- Replicate the adaptor made by tcbrindle in his tutorial file
- Writing a more complex adaptor using coyield
- Write a permutations adaptor using coyield
- Optional. Performance and usage tradeoffs