code: public static VectorProcedure asAccumulatorProcedure(final VectorAccumulator accumulator) {
          return new VectorProcedure() {
              @Override
              public void apply(int i, double value) {
                  accumulator.update(i, value);
              }
          };
      }
docs: Creates an accumulator procedure that adapts a vector accumulator for procedure
  interface. This is useful for reusing a single accumulator for multiple fold operations
  in multiple vectors.
  
  @param accumulator the vector accumulator
  
  @return an accumulator procedure