# Fx.dropUntilEffect

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

## Signatures

```ts
export declare const dropUntilEffect: {
    <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

`dropUntilEffect` makes the gate decision Effectful. The first `true` opens the gate and is
forwarded, but its `skipWhileEffect` implementation eagerly evaluates the predicate for every
later value as well; those later boolean results no longer affect forwarding.

## Ownership and lifetime

The gate is per run. Predicate effects inherit producer ordering and concurrency, are interrupted
with their invoking delivery, and expose `E2`/`R2`. Failures remain observable after the gate opens.

## 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.dropUntilEffect((n) => Ref.update(checks, (count) => count + 1).pipe(Effect.as(n === 2)))
    )
  )
  return { values, checks: yield* Ref.get(checks) } // { values: [2, 3], checks: 2 }
})
```
