I was googling for an algorithm 2 days ago and the first result matched word for word my exact question. Turns out someone in IRC pasted a solution for my question in lisppaste, and google archived it already before I had a chance to read the IRC reply. Freaky.