Effect for logging values alongside computations
Effect for logging values alongside computations
Compared to traditional Writer monad which accumulates values by default this effect can be interpreted in different ways:
- log values to the console or to a file as soon as they are produced
- accumulate values in a list
- Companion
- object
Value members
Inherited methods
def runWriter[R, U, O, A, B](w: Eff[R, A])(m: Aux[[_] =>> Writer[O, _$3], R, U]): Eff[U, (A, List[O])]
run a writer effect and return the list of written values
run a writer effect and return the list of written values
This uses a ListBuffer internally to append values
- Inherited from
- WriterInterpretation
def runWriterEval[R, U, O, A](w: Eff[R, A])(f: O => Eval[Unit])(m: Aux[[_] =>> Writer[O, _$10], R, U], ev: MemberIn[[A] =>> Eval[A], U]): Eff[U, A]
- Inherited from
- WriterInterpretation
def runWriterFold[R, U, O, A, B](w: Eff[R, A])(fold: RightFold[O, B])(m: Aux[[_] =>> Writer[O, _$4], R, U]): Eff[U, (A, B)]
More general fold of runWriter where we can use a fold to accumulate values in a mutable buffer
More general fold of runWriter where we can use a fold to accumulate values in a mutable buffer
- Inherited from
- WriterInterpretation
def runWriterIntoMonoid[R, U, O, M, A](w: Eff[R, A])(f: O => M)(m: Aux[[_] =>> Writer[O, _$12], R, U], M: Monoid[M]): Eff[U, (A, M)]
- Inherited from
- WriterInterpretation
def runWriterMonoid[R, U, O, A](w: Eff[R, A])(m: Aux[[_] =>> Writer[O, _$11], R, U], O: Monoid[O]): Eff[U, (A, O)]
- Inherited from
- WriterInterpretation
def runWriterUnsafe[R, U, O, A](w: Eff[R, A])(f: O => Unit)(m: Aux[[_] =>> Writer[O, _$7], R, U]): Eff[U, A]
Run a side-effecting fold
Run a side-effecting fold
- Inherited from
- WriterInterpretation