void (@NotNull List<ActionChangeRange> stack) { Iterator<ActionChangeRange> iterator = stack.iterator(); while (iterator.hasNext()) { ActionChangeRange next = iterator.next(); if (next.isValid()) { return; } iterator.remove(); } }