A monad in Haskell is defined to be a type class with two methods:
We have the following translation of Haskell and category theoretical language?:
Then from the category theoretical properties of we obtain (mixing the two languages)
And with the following definitions
one can verify that the two given definitions of a monad are equivalent.
category theory/monads, haskellwiki, wiki