requires: {#SortedArray. #NoDuplicatesCollection}. provides: {#SortedSet}. collections addPrototype: #SortedSet derivedFrom: {NoDuplicatesCollection. SortedArray}. s@(Set traits) sort [| newS | newS: (SortedSet newSizeOf: c). newS addAll: c. newS ]. s@(Set traits) sortBy: block [| newS | newS: (SortedSet newSizeOf: c). newS sortBlock: block. newS addAll: c. newS ]. sc@(SortedSet traits) add: obj [ (sc includes: obj) ifFalse: [sc insert: obj before: (sc indexForInserting: obj)]. obj ].