Questions tagged [monad]

In functional programming, a monad is an abstraction that allows structuring programs generically. Supporting languages may use monads to abstract away boilerplate code needed by the program logic. Monads achieve this by providing their own data type (a particular type for each type of monad).

Filter by
Sorted by
Tagged with
2 votes
1 answer
60 views

Are Haskell monads stronger than strong monads?

Haskell's monads are usually considered to mean strong monads in category theory, but it seems like the former is a bit stronger than the latter. With strong monads, you have a Kleisli extension ...
Jun Inoue's user avatar
  • 123
2 votes
1 answer
39 views

What is the object translating part of a monadic endofunctor?

A monad is an endofunctor $T:C\rightarrow C$ with natural transformations $\eta:id_C\rightarrow T$ and $\mu:T^2\rightarrow T$. Being natural transformations mean that $$T(f)\circ \eta_A = \eta_B\circ ...
Gergely's user avatar
  • 359
1 vote
0 answers
33 views

Mathematical explanation of the usage of monads to wrap data for avoiding errors

For the past two days I have been on a question to understand monads in the context of Haskell. A nice explanation I found is by Graham Hutton on the Computerphile channel see here. This explanation ...
tryst with freedom's user avatar
1 vote
2 answers
65 views

Translation between unit/bind and map/join in monads

Is there a translation between unit/bind and fmap/join in monads? https://stackoverflow.com/questions/34398239/with-monads-can-join-be-defined-in-terms-of-bind gives a partial one: bind f m = join (...
Gergely's user avatar
  • 359
0 votes
0 answers
19 views

Beta reduction and sequence of effect

The famous Monad is well known for handling effect in a functionally pure manner (e.g. IO Monad). On the other hand, in some application, runtime performance is the utmost interest and the compile ...
chanwoo ahn's user avatar
1 vote
1 answer
69 views

Are monads a unification of a number of computer science concepts?

The following commentator writes: Monads are a unification of a bunch of computer stuff, including sequencing, IO, non-determinism, state, concurrency and exceptions. When I say "unification&...
hawkeye's user avatar
  • 1,199