- Given
`a: Option α`

and`f : α → β`

we get a term of type`Option β`

by writing`a.map f`

. - Given
`a: Option α`

and`f: α → Option β`

we get a term of type`Option β`

by writing`a.bind f`

.

For both these it is more pleasant to use the `do`

notation.

Equivalent to the second is that there is a function `Option Option α → Option α`

called `join`

.

## IO Monad #

Roughly wraps with the state of the *real world*.

For example, a random number is wrapped in this.

**Question::** Why not just `ℕ`

?

- Otherwise we will violate the principle that the value of a function is determined by its arguments.

We still do want a natural number. To get this we can `run`

the `IO`

computation.

This does not lead to a contradiction, though in a way that may be somewhat surprising.