Skip to content

shritesh/nashfp-effects

Repository files navigation

NashFP - Effects

We'll be using Koka and OCaml Multicore so you might want to install them.

Let's look at a guess-the-number program that uses random numbers, local mutable state, console IO and panic on exceptions.

We'll define our own effect.

Then we'll handle that effect with the console or collect it.

Loops may diverge.

Effects really are just resumable exceptions.

Effects let you create your own control-flow structures like exceptions or your own scheduler.

You can do cool things if you resume twice.

By separating effect signatures from their implementation, algebraic effects provide a high degree of modularity, allowing programmers to express effectful programs independently of the concrete interpretation of their effects. - Handlers in Action (Sam Lindley, Ohad Kammar, Nicolar Oury)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published