simon.vergauwen
07/01/2019, 9:20 AMIO<E, A> very soon and you could do this then
val session: IO<Unit, String> = IO.just(Unit) // Unit is the same as `None` for `Option` here but could also be a custom domain like with `Either`
fun createSession(): IO<Nothing, Session>
session.handleErrorWith { createSession() }