code: public OrderingList<S> replace(int index, OrderedProperty<S> property) {
          int size = size();
          if (index < 0 || index >= size) {
              throw new IndexOutOfBoundsException();
          }
          OrderingList<S> newList = emptyList();
          for (int i=0; i<size; i++) {
              newList = newList.concat(i == index ? property : get(i));
          }
          return newList;
      }
docs: Returns a list with the given element replaced.