static <A> L<A> cloneListReplacingElementAtIndex(L<A> l, int i, A a) { listSetIfInRange(l = cloneList(l), i, a); ret l; }