static void addUnlessThere(L c, A a) { if (c != null && neq(last(c), a)) c.add(a); }