code: public static <R, T> R[] apply(R[] result, T[] array, Functor<R, T> functor) {
          for (int i = 0; i < array.length; ++i) result[i] = functor.invoke(array[i]);
          return result;
      }
docs: Invokes a functor over all elements in an array, and returns the results in a provided array.
  <code>
  result = functor(array)
  </code>
  
  @param <R> the result type of the functor
  @param <T> the type of the elements in the array
  @param result an array to store functor return values
  @param array an array
  @param functor a functor
  @return an array containing invocation results