| 619 | |
| 620 | /** @internal */ |
| 621 | const tuple = <T extends ArrayLike<Config.Config<any>>>(tuple: T): Config.Config< |
| 622 | { |
| 623 | [K in keyof T]: [T[K]] extends [Config.Config<infer A>] ? A : never |
| 624 | } |
| 625 | > => { |
| 626 | if (tuple.length === 0) { |
| 627 | return succeed([]) as any |
| 628 | } |
| 629 | if (tuple.length === 1) { |
| 630 | return map(tuple[0], (x) => [x]) as any |
| 631 | } |
| 632 | let result = map(tuple[0], (x) => [x]) |
| 633 | for (let i = 1; i < tuple.length; i++) { |
| 634 | const config = tuple[i] |
| 635 | result = pipe( |
| 636 | result, |
| 637 | zipWith(config, (tuple, value) => [...tuple, value]) |
| 638 | ) as any |
| 639 | } |
| 640 | return result as any |
| 641 | } |
| 642 | |
| 643 | /** |
| 644 | * @internal |