generalizations of monads and comonads