# exhaustLatestMapEffect

Maps each element to an Effect, running one now and retaining only the latest waiting value.

## Signatures

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

## Why

This is the Effect-producing form of {@link exhaustLatestMap }: it serializes
Effects while bounding pending work to one replaceable latest request.

## Admission, buffering, and cardinality

The first value while idle starts one Effect. While it runs, each callback is
evaluated and the constructed Effect replaces the single pending Effect. Each
admitted Effect emits exactly one successful result; superseded pending
Effects never run and emit nothing.

## Ownership and lifetime

Source and admitted Effect failures remain typed, as do callback service
requirements. The required `Scope` owns the active Effect; source completion
drains the final pending value, while interruption discards pending work and
runs active finalizers.

## Examples

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

const refreshes = Fx.mergeAll(
  Fx.at("v1", "0 millis"),
  Fx.at("v2", "5 millis"),
  Fx.at("v3", "10 millis")
)
const indexed = Fx.exhaustLatestMapEffect(refreshes, (version) =>
  Effect.as(Effect.sleep("20 millis"), `indexed:${version}`)
)

Effect.runPromise(Effect.scoped(Fx.collectAll(indexed))).then(console.log)
// ["indexed:v1", "indexed:v3"]
```
