Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/briancavalier/forgefx
Algebraic effects and handlers using generators
https://github.com/briancavalier/forgefx
async effects
Last synced: about 2 months ago
JSON representation
Algebraic effects and handlers using generators
- Host: GitHub
- URL: https://github.com/briancavalier/forgefx
- Owner: briancavalier
- Created: 2018-03-29T23:24:08.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2024-04-12T10:03:12.000Z (9 months ago)
- Last Synced: 2024-04-14T06:45:33.218Z (9 months ago)
- Topics: async, effects
- Language: JavaScript
- Size: 1.94 MB
- Stars: 57
- Watchers: 4
- Forks: 2
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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](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](https://github.com/koka-lang/koka)
* [Eff](http://www.eff-lang.org)
* [Scala Effekt](https://github.com/b-studios/scala-effekt)
* [Creed](https://github.com/briancavalier/creed)'s coroutine implementation