Generalisation of Recurse and StateRecurse
Generalisation of Recurse and StateRecurse
Helper trait for computations which might produce several M[X] in a stack of effects.
Helper trait for computations which might produce several M[X] in a stack of effects.
Either we can produce an X to pass to a continuation or we're done
Helper trait for computations which might produce several M[X] in a stack of effects and which need to keep some state around
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[M |: R, A] returns an A, this one can be combined with the last state value to produce a B
Generalisation of Recurse
Generalisation of Recurse
trait for translating one effect into other ones in the same stack
trait for translating one effect into other ones in the same stack
INTERPRET IN THE SAME STACK
INTERPRET IN THE SAME STACK
simpler version of intercept where the pure value is just mapped to another type
simpler version of intercept where the pure value is just mapped to another type
intercept an effect and interpret it in the same stack.
intercept an effect and interpret it in the same stack. This method is stack-safe
interpret the effect M in the M |: R stack
interpret the effect M in the M |: R stack
simpler version of interpret where the pure value is just mapped to another type
simpler version of interpret where the pure value is just mapped to another type
generalization of interpret and interpretState
generalization of interpret and interpretState
This method contains a loop which is stack-safe
interpret the effect M in the M |: R stack, keeping track of some state
interpret the effect M in the M |: R stack, keeping track of some state
simpler version of interpret1 where the pure value is just mapped to another type
simpler version of interpret1 where the pure value is just mapped to another type
generalization of interpret
generalization of interpret
This method contains a loop which is stack-safe
interpret an effect by running side-effects
interpret an effect by running side-effects
transform an effect into another one using a natural transformation
transform an effect into another one using a natural transformation
Translate one effect of the stack into some of the other effects in the stack
Translate one effect of the stack into some of the other effects in the stack