| 606 | |
| 607 | /** @internal */ |
| 608 | const tuple = <T extends ArrayLike<Config.Config<any>>>(tuple: T): Config.Config< |
| 609 | { |
| 610 | [K in keyof T]: [T[K]] extends [Config.Config<infer A>] ? A : never |
| 611 | } |
| 612 | > => { |
| 613 | if (tuple.length === 0) { |
| 614 | return succeed([]) as any |
| 615 | } |
| 616 | if (tuple.length === 1) { |
| 617 | return map(tuple[0], (x) => [x]) as any |
| 618 | } |
| 619 | let result = map(tuple[0], (x) => [x]) |
| 620 | for (let i = 1; i < tuple.length; i++) { |
| 621 | const config = tuple[i] |
| 622 | result = pipe( |
| 623 | result, |
| 624 | zipWith(config, (tuple, value) => [...tuple, value]) |
| 625 | ) as any |
| 626 | } |
| 627 | return result as any |
| 628 | } |
| 629 | |
| 630 | /** |
| 631 | * @internal |