State combinators

TODO: talk about session types