Programming, Computer Science, JavaScript, Functional Programming.
set2[j]) { newSet.push(set1[i]); i++; } else { newSet.push(set2[j]); j++; } } return newSet; // unnecessary return; make typechecker happy } A few things to note about this implementation: We use the opaque keyword when exporting the definition of the NumberSet type. This means that Flow will