static bool closeAfterRemove(Cl l, A a) { if (!remove(l, a)) false; close(a); true; }