Algebraic Effects and Handlers

Andrej Bauer

Basics

Take the operation symbol for :

3 + (4 + 5)

plus(b:2 if b = 0 then 3
         else plus(c:2 if c = 0 then 4
                       else 5))

where is the arity, or number of distinct effects


where is the parameter type, a monad


where is an unbounded type; a delimited continuation