Examples to illustrate the use of algebraic effects in OCaml. See
- A concurrent round-robin scheduler
- Mutable state
- ML-style refs
- Transactional state
- Asynchronous IO in direct-style
- Delimcc encoding
- Dynamic wind
- Deriving generator from any interator
- Promises
- Backtracking N-Queens
- Monadic reflection
- MVars
- Chameneos-redux
- Memoization
- Nondeterminism
- A mathematical game: Nim
- Message-passing pipeline: Sieve of Eratostheneses
- Deep pipes
- Non termination from effects
- Continuation cloning is tricky
- A solution to the Same Fringe Problem
- Reverse-mode Algorithmic Differentiation
Follow the instructions to install Multicore OCaml. Then,
$ opam install dune lwt
$ make
This builds all of the examples.
These are other examples that utilise OCaml effect handlers that are not in this repo: