code: public static <T, R, C extends Collection<R>, E extends Exception> C map(final T[] a, final int fromIndex, final int toIndex,
              final Try.Function<? super T, ? extends R, E> func, final IntFunction<? extends C> supplier) throws E {
          checkFromToIndex(fromIndex, toIndex, len(a));
          N.checkArgNotNull(func);
  
          if (N.isNullOrEmpty(a)) {
              return supplier.apply(0);
          }
  
          final C result = supplier.apply(toIndex - fromIndex);
  
          for (int i = fromIndex; i < toIndex; i++) {
              result.add(func.apply(a[i]));
          }
  
          return result;
      }
docs: Mostly it's designed for one-step operation to complete the operation in one step.
  <code>java.util.stream.Stream</code> is preferred for multiple phases operation.
  
  @param a
  @param fromIndex
  @param toIndex
  @param func
  @param max
  @param supplier
  @return