One way to find the cartesian product of multiple sets is by using nested loops. Here's how to do it in TypeScript:
index.ts272 chars16 lines
The output of this code will be an array of arrays, where each inner array represents one combination of the sets:
index.ts315 chars15 lines
gistlibby LogSnag