public static Skolem nthRestComputation(Skolem list, IntegerWrapper narg) {
    if (!(Logic.enumeratedListP(list))) {
      return (null);
    }
    { int n = narg.wrapperValue;
      Vector elements = list.definingProposition.arguments;
      int nelements = elements.length() - 1;
      List restelements = List.newList();

      if (n < 0) {
        n = nelements + n;
      }
      if ((n < 0) ||
          (n > nelements)) {
        return (null);
      }
      { int i = Stella.NULL_INTEGER;
        int iter000 = n;
        int upperBound000 = nelements - 1;
        Cons collect000 = null;

        for (;iter000 <= upperBound000; iter000 = iter000 + 1) {
          i = iter000;
          if (collect000 == null) {
            {
              collect000 = Cons.cons((elements.theArray)[i], Stella.NIL);
              if (restelements.theConsList == Stella.NIL) {
                restelements.theConsList = collect000;
              }
              else {
                Cons.addConsToEndOfConsList(restelements.theConsList, collect000);
              }
            }
          }
          else {
            {
              collect000.rest = Cons.cons((elements.theArray)[i], Stella.NIL);
              collect000 = collect000.rest;
            }
          }
        }
      }
      return (Logic.createLogicalList(restelements));
    }
  }