Composable effects
October 10, 2018 ยท View on GitHub
This is an experiment with composable effects and effectful programs. It's basically algebraic effects and handlers, using generators as the underlying implementation of continuations.
Try it
node -r @babel/register ./examples/delay
node -r @babel/register ./examples/async-problem/index ./examples/async-problem/input
Check out more examples
Highlights
- Separation of effect interfaces and implementations: program with interfaces, supply effect implementations when running programs.
- Composable effects: create new effects from existing ones.
- Composable programs:
yield *can be used to compose effectful programs. - Asynchronous effects with cancelation.
Inspiration
- Koka
- Eff
- Scala Effekt
- Creed's coroutine implementation