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

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 ...
2 votes
1 answer

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 ...
1 vote
0 answers

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 ...
1 vote
2 answers

Translation between unit/bind and map/join in monads

Is there a translation between unit/bind and fmap/join in monads? gives a partial one: bind f m = join (...
0 votes
0 answers

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 ...
1 vote
1 answer

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&...