Programming, Computer Science, JavaScript, Functional Programming.
immutable; our insert and union functions return a new NumberSet without modifying their inputs. This shows that abstract data types are compatible with purity and functional programming, despite the fact that the ones built into JavaScript are mutable. Our empty and isEmpty functions run in