by _pmf_ · 12y ago · 0 comments
This should prove once and forever that tail recursion is dangerous and does not help with real world problems. Clearly, blowing up the stack would have been the appropriate and safer response here.
If I had to implement this, I would just imagine that just taking your mapping, and for each key,value , do a title.replace(key,value). I would be a "good enough" solution , and in the worst case you still have human editors on HN.