I should have explained it better in the comment, but what I really meant was that I did not want to complicate the code with an algorithm that is better than O(n^2).  The code you give is also O(n^2).  Personally, I do not mind the tail call, particularly if I think it will be TCO'd.