static A last(L l) { return empty(l) ? null : l.get(l.size()-1); } static char last(S s) { ret empty(s) ? '#' : s.charAt(l(s)-1); } static int last(int[] a) { ret l(a) != 0 ? a[l(a)-1] : 0; } static double last(double[] a) { ret l(a) != 0 ? a[l(a)-1] : 0; } static A last(A[] a) { ret l(a) != 0 ? a[l(a)-1] : null; } static A last(Iterator it) { A a = null; while ping (it.hasNext()) a = it.next(); ret a; } static A last(Cl l) { if (l == null) null; if (l cast L) ret (A) last(l); if (l cast SortedSet) ret (A) last(l); Iterator it = iterator(l); A a = null; while ping (it.hasNext()) a = it.next(); ret a; } static A last(SortedSet l) { ret l == null ? null : l.last(); } ifclass ReverseChain static A last(ReverseChain l) { ret l?.element; } endif