Skip to content

Commit 872438b

Browse files
committed
add list of basic transformers
1 parent b4d1b05 commit 872438b

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

content/monad-transformers.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,28 @@ last-updated: 2015-02-24
77
last-reviewed: 2015-02-24
88
---
99

10-
* Basic transformers
10+
# Monad Transformers
11+
12+
## Basic Transformers
13+
14+
The following is a list of some basic transformers:
15+
16+
### MaybeT
17+
18+
A `Maybe a` wrapped in any other monad, i.e. `m (Maybe a)
19+
20+
### ReaderT
21+
22+
`ReaderT` - a `Reader r a` in which the resulting `a` is wrapped in any other monad, i.e. `r -> m a`
23+
24+
### StateT
25+
26+
`StateT` - a `State s a` in which the return value `a` and state `s` are wrapped in any other monad, i.e. `s -> m (a, s)`
27+
28+
### EitherT
29+
30+
`EitherT` - an `Either e a` wrapped in any other monad, i.e. `m (Either e a)`
31+
1132
* Simple examples of usage
1233
* Pitfalls of Writer laziness
1334
* Dealing with exceptions and control structures (monad-control and exceptions packages), and losing state

0 commit comments

Comments
 (0)