( predicate: (input: In) => Effect.Effect<boolean, E, R> )
| 1521 | * @since 2.0.0 |
| 1522 | */ |
| 1523 | export const findEffect = <In, E, R>( |
| 1524 | predicate: (input: In) => Effect.Effect<boolean, E, R> |
| 1525 | ): Sink<Option.Option<In>, In, In, E, R> => |
| 1526 | reduceWhileEffect( |
| 1527 | Option.none<In>, |
| 1528 | Option.isNone, |
| 1529 | (acc, in_) => Effect.map(predicate(in_), (b) => b ? Option.some(in_) : acc) |
| 1530 | ) |
| 1531 | |
| 1532 | /** |
| 1533 | * Creates a sink which sums up its inputs. |
nothing calls this directly
no test coverage detected