code: public Vector transform(VectorFunction function) {
          VectorIterator it = iterator();
          Vector result = blank();
  
          while (it.hasNext()) {
              double x = it.next();
              int i = it.index();
              result.set(i, function.evaluate(i, x));
          }
  
          return result;
      }
docs: Builds a new vector by applying given {@code function} to each element
  of this vector.
  
  @param function the vector function
  
  @return the transformed vector