Programming, Computer Science, JavaScript, Functional Programming.
return true; } union(set: NumberSetI) { return this; } } export class Even implements NumberSetI { add(n: number) { return new Insert(n, this); } isEmpty() { return false; } has(n: number) { return n % 2 === 0; } union(set: NumberSetI) { return new Union(this, set); } } Everything is the set which