Definition
A monad transformer consists of:
- A type constructor
t
of kind(* -> *) -> * -> *
- Monad operations
return
andbind
(or an equivalent formulation) for allt m
wherem
is a monad, satisfying the monad laws - An additional operation,
lift :: m a -> t m a
, satisfying the following laws: (the notation`bind`
below indicates infix application):lift . return = return
lift (m `bind` k) = (lift m) `bind` (lift . k)
Read more about this topic: Monad Transformer
Famous quotes containing the word definition:
“One definition of man is an intelligence served by organs.”
—Ralph Waldo Emerson (18031882)
“Mothers often are too easily intimidated by their childrens negative reactions...When the child cries or is unhappy, the mother reads this as meaning that she is a failure. This is why it is so important for a mother to know...that the process of growing up involves by definition things that her child is not going to like. Her job is not to create a bed of roses, but to help him learn how to pick his way through the thorns.”
—Elaine Heffner (20th century)
“Scientific method is the way to truth, but it affords, even in
principle, no unique definition of truth. Any so-called pragmatic
definition of truth is doomed to failure equally.”
—Willard Van Orman Quine (b. 1908)