Monad transformers

Motivation

Running example: a simple interpreter

Interpreter0: no side-effects

code

Enter monad transformers

Interpreter1: the reader monad transformer

code

Exercise:

Interpreter 2: the state monad transformer

code

Summary