Function effing_mad::transform0

source ·
pub fn transform0<G1, R, E, H, PreEs, HandlerEs, PostEs, EffIndex, PreIs, HandlerIs, PostIs, I1Index, BeginIndex1, BeginIndex2, BeginIndex3, SubsetIndices1, SubsetIndices2, EmbedIndices1, EmbedIndices2, EmbedIndices3>(
    g: G1,
    handler: impl FnMut(E) -> H
) -> impl Generator<PostIs, Yield = PostEs, Return = R>where
    E: Effect,
    H: Generator<HandlerIs, Yield = HandlerEs, Return = E::Injection>,
    PreEs: EffectList<Injections = PreIs> + CoprodUninjector<E, EffIndex, Remainder = PostEs>,
    HandlerEs: EffectList<Injections = HandlerIs> + CoproductEmbedder<PostEs, EmbedIndices1>,
    PostEs: EffectList<Injections = PostIs> + CoproductEmbedder<PostEs, EmbedIndices2>,
    PreIs: CoprodInjector<Begin, BeginIndex1> + CoprodUninjector<Tagged<E::Injection, E>, I1Index, Remainder = PostIs>,
    HandlerIs: CoprodInjector<Begin, BeginIndex2>,
    PostIs: CoprodInjector<Begin, BeginIndex3> + CoproductSubsetter<HandlerIs, SubsetIndices1> + CoproductSubsetter<PostIs, SubsetIndices2> + CoproductEmbedder<PreIs, EmbedIndices3>,
    G1: Generator<PreIs, Yield = PreEs, Return = R>,
Expand description

Handle one effect of g by running other effects that it already uses.

This function is a special case of transform for when the handler does not introduce any effects on top of the ones from g that it’s not handling.

For introducing a new effect, see transform1.