| 701 | // ============================================================================= |
| 702 | |
| 703 | const allTupled = <const T extends ArrayLike<Options.Options<any>>>(arg: T): Options.Options< |
| 704 | { |
| 705 | [K in keyof T]: [T[K]] extends [Options.Options<infer A>] ? A : never |
| 706 | } |
| 707 | > => { |
| 708 | if (arg.length === 0) { |
| 709 | return none as any |
| 710 | } |
| 711 | if (arg.length === 1) { |
| 712 | return map(arg[0], (x) => [x]) as any |
| 713 | } |
| 714 | let result = map(arg[0], (x) => [x]) |
| 715 | for (let i = 1; i < arg.length; i++) { |
| 716 | const curr = arg[i] |
| 717 | result = map(makeBoth(result, curr), ([a, b]) => [...a, b]) |
| 718 | } |
| 719 | return result as any |
| 720 | } |
| 721 | |
| 722 | const getHelpInternal = (self: Instruction): HelpDoc.HelpDoc => { |
| 723 | switch (self._tag) { |