code: public OrderingList<S> reduce() {
          if (size() == 0) {
              return this;
          }
  
          Set<ChainedProperty<S>> seen = new HashSet<ChainedProperty<S>>();
          OrderingList<S> newList = emptyList();
  
          for (OrderedProperty<S> property : this) {
              ChainedProperty<S> chained = property.getChainedProperty();
              if (!seen.contains(chained)) {
                  newList = newList.concat(property);
                  seen.add(chained);
              }
          }
  
          return newList;
      }
docs: Eliminates redundant ordering properties.