News for hackers. Stuff that matters.
Re:Are you one of the 10% of programmers who can write a bin... by FutureNerd on Monday April 19, 2010 @11:40PM (#1278564)
I have to say that the usual way of writing binary search recursively doesn't help break the problem down. It's already as broken down as it gets, and you're just tweaking the single case. The loop version wins for clarity.

I think second runner-up is the recursive version where you use slices... does lisp have slices?

Re:Are you one of the 10% of programmers who can write a bin... by eru on Tuesday April 20, 2010 @04:27PM (#1280493)
Loops are just special cases of recursion.

And binary search is definitely not the right operation on linked lists. So even in Lisp you should use a different data structure if you want to do a binary search.