code: @Nonnull
      public Word<I> flatten() {
          int len = length();
          Object[] array = new Object[len];
          writeToArray(0, array, 0, len);
          return new SharedWord<>(array);
      }
docs: Retrieves a "flattened" version of this word, i.e., without any hierarchical structure attached. This can be
  helpful if {@link Word} is subclassed to allow representing, e.g., a concatenation dynamically, but due to
  performance concerns not too many levels of indirection should be introduced.
  
  @return a flattened version of this word.