code: public static <T> T getAt(List<T> self, int idx) {
          int size = self.size();
          int i = normaliseIndex(idx, size);
          if (i < size) {
              return self.get(i);
          } else {
              return null;
          }
      }
docs: Support the subscript operator for a List.
  <pre class="groovyTestCase">def list = [2, "a", 5.3]
  assert list[1] == "a"</pre>
  
  @param self a List
  @param idx  an index
  @return the value at the given index
  @since 1.0