code: public void set(int index, SoyData value) {
      if (index == list.size()) {
        list.add(ensureValidValue(value));
      } else {
        list.set(index, ensureValidValue(value));
      }
    }
docs: Sets a data value at a given index.
  
  @param index The index.
  @param value The data to set.