@Test
  public void deepMiddleTest() {
    IntArray arr = IntArray.from(
        0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
        10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
        20, 21, 22, 23, 24, 25, 26);

    for(int i = 8; i >= 6; i--) {
      arr = arr.remove(i);
    }

    for(int i = 15; i >= 9; i--) {
      arr = arr.remove(i - 3);
    }

    assertEquals(
        IntArray.from(0, 1, 2, 3, 4, 5, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26), arr);

    IntArray arr2 = IntArray.from(
        5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
        20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30);
    for(int i = 4; i >= 0; i--) arr2 = arr2.cons(i);
    for(int i = 31; i <= 35; i++) arr2 = arr2.snoc(i);
    for(int i = 22; i >= 16; i--) arr2 = arr2.remove(i);
    assertEquals(
        IntArray.from(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
            14, 15, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35),
        arr2);
  }