Ah, Either. Didn't recognize you from the first glance.

Now we need to invent do-notation, higher kinds and typeclasses and this code would be well composable.