# Fx.skipWhileEffect

Skips elements from an Fx while an effectful predicate returns true.
Emits from the first element for which the predicate effect succeeds with false (including that element) and all following elements.

## Signatures

```ts
export declare const skipWhileEffect: {
    <A, E2, R2>(predicate: (a: A) => Effect.Effect<boolean, E2, R2>): <E, R>(fx: Fx<A, E, R>) => Fx<A, E | E2, R | R2>;
    <A, E, R, E2, R2>(fx: Fx<A, E, R>, predicate: (a: A) => Effect.Effect<boolean, E2, R2>): Fx<A, E | E2, R | R2>;
};
```

## Why

`skipWhileEffect` performs Effectful prefix decisions. The gate opens at the first false result,
but the implementation eagerly constructs and runs `predicate(a)` before reading that gate, so
the predicate still runs for every later input even though those values are always forwarded.

## Ownership and lifetime

The gate belongs to one run, while predicate invocation inherits the producer's ordering and
concurrency. Predicate failure is delivered even after the gate opened; services remain required
and interruption cancels whichever callback Effects the producer attached to the run.

## Examples

```ts
import { Effect, Ref } from "effect"
import { Fx } from "@typed/fx"
const program = Effect.gen(function* () {
  const checks = yield* Ref.make(0)
  const values = yield* Fx.collectAll(
    Fx.fromIterable([2, 3]).pipe(
      Fx.skipWhileEffect((n) => Ref.update(checks, (count) => count + 1).pipe(Effect.as(n < 2)))
    )
  )
  return { values, checks: yield* Ref.get(checks) } // { values: [2, 3], checks: 2 }
})
```
