# exhaustMapEffect

Maps each element of an Fx to an Effect, ignoring new elements until the current effect completes.

## Signatures

```ts
export declare const exhaustMapEffect: FlatMapEffectLike;
```

## Why

This Effect-producing form of {@link exhaustMap } prevents overlapping command
Effects while deliberately applying no queue or latest-value replay policy.

## Admission and cardinality

The first value while idle starts one Effect and emits its one successful
result. For values received while it runs, `f` is still evaluated to construct
an Effect, but that Effect is not run or queued.

## Ownership and lifetime

Source and callback Effect failures remain typed and callback services are
added to the output requirements. The active Effect is owned by the returned
Fx's required `Scope`; completion waits for it and interruption runs its
finalizers.

## Examples

```ts
import { Fx } from "@typed/fx"
import { Effect } from "effect"

const accepted = Fx.exhaustMapEffect(Fx.fromIterable([1, 2]), (id) =>
  Effect.as(Effect.sleep("20 millis"), `saved:${id}`)
)

Effect.runPromise(Effect.scoped(Fx.collectAll(accepted))).then(console.log)
// ["saved:1"]: the second Effect is constructed but not admitted
```
