Programming, Computer Science, JavaScript, Functional Programming.
this to the abstract data type requires adding one additional function: function smallestIntegerAbove( n: number, set: NumberSet) : number | null { for (const num of set) { if (num > n) return num; } return null; } To add this method to our object implementation, though, we’d have to modify every