( predicate: (input: In) => Effect.Effect<boolean, E, R> )
| 1596 | * @since 2.0.0 |
| 1597 | */ |
| 1598 | export const findEffect = <In, E, R>( |
| 1599 | predicate: (input: In) => Effect.Effect<boolean, E, R> |
| 1600 | ): Sink<Option.Option<In>, In, In, E, R> => |
| 1601 | reduceWhileEffect( |
| 1602 | Option.none<In>, |
| 1603 | Option.isNone, |
| 1604 | (acc, in_) => Effect.map(predicate(in_), (b) => b ? Option.some(in_) : acc) |
| 1605 | ) |
| 1606 | |
| 1607 | /** |
| 1608 | * Creates a sink which sums up its inputs. |
nothing calls this directly
no test coverage detected