Tail Recursive Reverse in Java
public static Cons trrev (Cons lst) { return trrevb(lst, null); } public static Cons trrevb (Cons in, Cons out) { if ( in == null ) return out; else return trrevb( rest(in), cons(first(in), out) ); }