briancavalier / forgefx

Algebraic effects and handlers using generators

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Composable effects

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

About

Algebraic effects and handlers using generators


Languages

Language:JavaScript 100.0%