|
|
|
|
|
by kmill
3358 days ago
|
|
I checked that while I was writing my comment, and I don't believe there is such an isomorphism. For the identity monad, we have the following functions: return :: a -> a
return = id
join :: a -> a
join = id
If this were isomorphic to the function composition monoid, there would be some way to interpret join as function composition, but I don't see it. Please show me if you know the isomorphism! (My thinking is a bit fuzzy on this, but it appears to me that the identity monad is actually isomorphic to a trivial monoid --- if you want, you can model the trivial monoid as the one-element set {0} under addition.)Bind is (>>=) :: a -> (a -> b) -> b
(>>=) = flip id
that is, function application. Still no function composer in sight, though. |
|
This article seems to imply a correlation between the fish operator (<=<) and composition. Specifically his section on Kleisli monad.
http://www.haskellforall.com/2012/08/the-category-design-pat...
But I don't know the space well enough to know if that's answering your question.