An alternative way to define monads