Helper trait for computations
which might produce several M[X] in a stack of effects and which need to keep some state around
This is typically the case for Writer or State which need to keep some state S after each evaluation
Evaluating the effect M[X] might use the previous S value as shown in the apply method
Finally when the Eff[R, A] returns an A, this one can be combined with the last state value to produce a B
Helper trait for computations which might produce several M[X] in a stack of effects and which need to keep some state around
This is typically the case for Writer or State which need to keep some state S after each evaluation Evaluating the effect M[X] might use the previous S value as shown in the
apply method
Finally when the Eff[R, A] returns an A, this one can be combined with the last state value to produce a B