( s: LazyArg<S>, contFn: Predicate<S>, f: (s: S, input: Arr.NonEmptyReadonlyArray<In>) => Effect.Effect<S, E, R> )
| 765 | const arr = yield* upstream |
| 766 | for (let i = 0; i < arr.length; i++) { |
| 767 | state = yield* f(state, arr[i]) |
| 768 | if (contFn(state)) continue |
| 769 | return [ |
| 770 | state, |
| 771 | (i + 1) < arr.length ? (arr.slice(i + 1) as any) : undefined |
| 772 | ] as const |
| 773 | } |
| 774 | } |
| 775 | }).pipe( |
| 776 | Pull.catchDone(() => Effect.succeed<End<S, In>>([state])) |
| 777 | ) |
| 778 | }) |
| 779 | |
| 780 | /** |
| 781 | * Folds non-empty input arrays into state with an effectful function. |
| 782 | * |
| 783 | * **When to use** |
| 784 | * |
| 785 | * Use to update state with an effectful function once per pulled non-empty |
| 786 | * input array when batch-level processing is the natural unit. |
| 787 | * |
nothing calls this directly
no test coverage detected
searching dependent graphs…