code: public static <T, E extends Exception> ByteList mapToByte(final T[] a, final int fromIndex, final int toIndex, final Try.ToByteFunction<? super T, E> func)
              throws E {
          checkFromToIndex(fromIndex, toIndex, len(a));
          N.checkArgNotNull(func);
  
          if (N.isNullOrEmpty(a)) {
              return new ByteList();
          }
  
          final ByteList result = new ByteList(toIndex - fromIndex);
  
          for (int i = fromIndex; i < toIndex; i++) {
              result.add(func.applyAsByte(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
  @return