# mapEffect

Maps matched output with an Effect while preserving `None`.

## Signatures

```ts
export declare const mapEffect: {
    <O, B, E2, R2>(f: (o: O) => Effect.Effect<B, E2, R2>): <I, R, E>(guard: GuardInput<I, O, E, R>) => Guard<I, B, E | E2, R | R2>;
    <I, O, E, R, B, E2, R2>(guard: GuardInput<I, O, E, R>, f: (o: O) => Effect.Effect<B, E2, R2>): Guard<I, B, E | E2, R | R2>;
};
```

## Why

Effectful mapping can add typed errors and services without changing non-match into failure.

## Ownership and lifetime

Construction acquires no resources; the mapping Effect starts only after the source Guard produces `Some`.

## Examples

```ts
import { liftPredicate, mapEffect } from "@typed/guard"
import { Effect } from "effect"
const length = mapEffect(liftPredicate((u: unknown): u is string => typeof u === "string"), (s) => Effect.succeed(s.length))
```
