code: public static MutableIntTuple reverse(
          IntTuple t, MutableIntTuple result)
      {
          result = validate(t, result);
          if (t == result)
          {
              int n = t.getSize();
              int nh = n / 2;
              for (int i = 0; i < nh; i++)
              {
                  int temp = result.get(i);
                  result.set(i, result.get(n - 1 - i));
                  result.set(n - 1 - i, temp);
              }
          }
          else
          {
              int n = t.getSize();
              for (int i = 0; i < n; i++)
              {
                  result.set(i, t.get(n - 1 - i));
              }
          }
          return result;
      }
docs: Reverse the given tuple. This will create a new tuple whose elements
  are the same as in the given tuple, but in reverse order.<br>
  <br>
  In order to create a reversed <i>view</i> on a tuple, the
  {@link #reversed(IntTuple)} method may be used.
  
  @param t The input tuple
  @param result The result tuple
  @return The result tuple
  @throws IllegalArgumentException If the given tuples do not
  have the same {@link Tuple#getSize() size}