# Push.filterInput

Keeps successful inputs that satisfy `f` and discards the rest.

Calling `onSuccess` runs the predicate immediately. A match constructs one Sink
callback Effect; a non-match immediately returns an empty acknowledgment.
Predicate allocation and throws therefore occur before the returned Effect is
run. The producer controls call order and concurrency; output is preserved.

## Signatures

```ts
export declare const filterInput: {
    <A>(f: (a: A) => boolean): <E, R, B, E2, R2>(push: Push<A, E, R, B, E2, R2>) => Push<A, E, R, B, E2, R2>;
    <A, E, R, B, E2, R2>(push: Push<A, E, R, B, E2, R2>, f: (a: A) => boolean): Push<A, E, R, B, E2, R2>;
};
```

## Why

Filtering before the consumer avoids teaching the underlying Sink about input
values that are irrelevant to it.

## Ownership and lifetime

The predicate is synchronous at `onSuccess` invocation and acquires no
resources. Accepted callback Effects retain the original Sink's errors,
services, interruption, and cleanup.

## 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 checks: Array<number> = []
const positives = Push.filterInput(
  Push.make(Sink.make(() => Effect.void, (n: number) => Effect.log(n)), Fx.empty),
  (n) => (checks.push(n), n > 0)
)
const acknowledgement = positives.onSuccess(-1)
// checks is already [-1]; acknowledgement performs no Sink callback.
```
