Programming, Computer Science, JavaScript, Functional Programming.
NumberSetI; isEmpty(): boolean; has(number): boolean; union(NumberSetI): NumberSetI; } This interface has four of the five functions which we implemented for our abstract data type. Rather than providing a way to get an empty set as a method on our interface, we’ll create a class for empty sets: