@Contract(pure=true)
  public static int @NotNull [] remove(int @NotNull [] src, int idx) {
    int length = src.length;
    if (idx < 0 || idx >= length) {
      throw new IllegalArgumentException("invalid index: " + idx);
    }
    int[] result = newIntArray(src.length - 1);
    System.arraycopy(src, 0, result, 0, idx);
    System.arraycopy(src, idx + 1, result, idx, length - idx - 1);
    return result;
  }
@Contract(pure=true)
  public static int @NotNull [] remove(int @NotNull [] src, int idx)