>>14262960Look at the entire function, not just input or output. You have a function which takes a dumb value, and returns a context:
a -> f(b)
with monads, that same function accepts context. You don't have to rewrite it.
f(a) -> f(b)
Think of context like different shell environments, ftp, ssh, psql. That's like Either or IO or Task. Also note you have to write a lot of this implementation yourself in your type. Nothing provides it for you. Your new type needs to provide monadic and applicative interface for the contexts you want to support.