code: @Nonnull
      public <T> Word<T> transform(Function<? super I, ? extends T> transformer) {
          int len = length();
          Object[] array = new Object[len];
          int i = 0;
          for (I symbol : this) {
              array[i++] = transformer.apply(symbol);
          }
          return new SharedWord<>(array);
      }
docs: Transforms a word symbol-by-symbol, using the specified transformation function.
  
  @param transformer
  the transformation function
  
  @return the transformed word