( f: (input: In) => Effect.Effect<boolean, E, R> )
| 1849 | * @since 2.0.0 |
| 1850 | */ |
| 1851 | export const forEachWhile = <In, E, R>( |
| 1852 | f: (input: In) => Effect.Effect<boolean, E, R> |
| 1853 | ): Sink<void, In, never, E, R> => |
| 1854 | forEachWhileArray(Effect.fnUntraced(function*(input) { |
| 1855 | for (let i = 0; i < input.length; i++) { |
| 1856 | const cont = yield* f(input[i]) |
| 1857 | if (!cont) return false |
| 1858 | } |
| 1859 | return true |
| 1860 | })) |
| 1861 | |
| 1862 | /** |
| 1863 | * Runs an effectful function for each non-empty input array while it returns |
nothing calls this directly
no test coverage detected