| 7148 | * depends on both sides and local state. |
| 7149 | * |
| 7150 | * **Details** |
| 7151 | * |
| 7152 | * The combining function receives the current state and pull functions for the |
| 7153 | * left and right streams. It returns the next non-empty chunk together with the |
| 7154 | * next state. |
| 7155 | * |
| 7156 | * **Example** (Combining stream chunks with state) |
| 7157 | * |
| 7158 | * ```ts import.meta.vitest |
| 7159 | * import { Effect, Stream } from "effect" |
| 7160 | * |
| 7161 | * const stream = Stream.make(1, 2).pipe( |
| 7162 | * Stream.combineArray( |
| 7163 | * Stream.make(10, 20), |
| 7164 | * () => true, |
| 7165 | * (useLeft, pullLeft, pullRight) => |
| 7166 | * Effect.gen(function*() { |
| 7167 | * const array = useLeft ? yield* pullLeft : yield* pullRight |
| 7168 | * return [array, !useLeft] as const |
| 7169 | * }) |
| 7170 | * ) |
| 7171 | * ) |