This package provides methods for a computation which allows writing into external records.
A Writer<W, A> object represents a computation, returning A and writing W out:
Writer<W, A>
A
W
type Writer<W, A> = () => [returned: A, written: W];// Note that the actual code is defined as a special case of `WriterT`. Copy
type Writer<W, A> = () => [returned: A, written: W];// Note that the actual code is defined as a special case of `WriterT`.
And you can work with it by the following methods:
censor
listen
pass
Writer
tell
evaluateWriter
executeWriter
mapWriter
Moreover a WriterT<R, M, A> monad transformer is the generalized version of Writer<R, A>. It returns not A, but object on monad M.
WriterT<R, M, A>
Writer<R, A>
M
Generated using TypeDoc
This package provides methods for a computation which allows writing into external records.
A
Writer<W, A>
object represents a computation, returningA
and writingW
out:And you can work with it by the following methods:
censor
- Censors and transforms data to be written.listen
- Listens the written record.pass
- Applies the function returned from aWriter
to a record.tell
- Writes data as a record.evaluateWriter
- Runs aWriter
and gets only the result.executeWriter
- Runs aWriter
and gets only the written record.mapWriter
- Transforms output and record of aWriter
.Moreover a
WriterT<R, M, A>
monad transformer is the generalized version ofWriter<R, A>
. It returns notA
, but object on monadM
.