Generalized monad interface