# mapEffect

Effectfully transforms each Fx output value.

The mapper runs once per upstream value and emits one result on success, in
upstream order for a sequential source. Its typed failures join `E2`; its
required services join `R2`. The input side is unchanged.

## Signatures

```ts
export declare const mapEffect: {
    <B, C, E3, R3>(f: (b: B) => Effect.Effect<C, E3, R3>): <A, E, R, E2, R2>(push: Push<A, E, R, B, E2, R2>) => Push<A, E, R, C, E2 | E3, R2 | R3>;
    <A, E, R, B, E2, R2, C, E3, R3>(push: Push<A, E, R, B, E2, R2>, f: (b: B) => Effect.Effect<C, E3, R3>): Push<A, E, R, C, E2 | E3, R2 | R3>;
};
```

## Why

Use this for output enrichment that needs Effect services or can fail while
keeping input handling independent.

## Ownership and lifetime

Each mapper Effect runs inside the output subscription and is interrupted with
it. No work starts before `run`; cleanup belongs to the upstream Fx and mapper
effects. `mapEffect` itself introduces no separate buffer or long-lived fiber.

## Examples

```ts
import { Effect } from "effect"
import * as Fx from "@typed/fx/Fx"
import * as Push from "@typed/fx/Push"
import * as Sink from "@typed/fx/Sink"

const push = Push.make(Sink.make(() => Effect.void, (_: string) => Effect.void), Fx.succeed(2))
const doubled = Push.mapEffect(push, (n) => Effect.succeed(n * 2))
```
