# Push.filterMapInput

Transforms an input and forwards it only when `f` returns `Some`.

Calling `onSuccess` evaluates `f` immediately. `Some(a)` constructs one Sink
callback Effect; `None` immediately returns an empty acknowledgment. Mapping
allocation and throws therefore happen before the returned Effect runs. Calls
are not serialized, so ordering follows the producer. Output is unchanged.

## Signatures

```ts
export declare const filterMapInput: {
    <C, A>(f: (c: C) => Option.Option<A>): <P extends Push.Any>(push: P) => Push<C, Sink.Error<P>, Sink.Services<P>, Fx.Fx.Success<P>, Fx.Fx.Error<P>, Fx.Fx.Services<P>>;
    <A, E, R, B, E2, R2, C>(push: Push<A, E, R, B, E2, R2>, f: (c: C) => Option.Option<A>): Push<C, E, R, B, E2, R2>;
};
```

## Why

`Option` combines parsing and filtering without a sentinel value or a separate
predicate pass.

## Ownership and lifetime

The mapping is synchronous at `onSuccess` invocation and resource-free. A
forwarded callback Effect retains the original Sink's lifetime, error channel,
and service requirements.

## Examples

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

const parsed: Array<string> = []
const integers = Push.filterMapInput(
  Push.make(Sink.make(() => Effect.void, (n: number) => Effect.log(n)), Fx.empty),
  (text: string) => {
    parsed.push(text)
    return /^\d+$/.test(text) ? Option.some(Number(text)) : Option.none()
  }
)
const acknowledgement = integers.onSuccess("nope")
// parsed is already ["nope"]; acknowledgement performs no Sink callback.
```
