
15 Jan
2010
15 Jan
'10
8:48 p.m.
On Fri, Jan 15, 2010 at 5:17 PM, Tim Perry
Hi Joe,
I think you wanted (length list - 1) where you call do_search. The version below is my rewrite with guards, this change, and "midVal" which keeps "list !! mid" from being evaluated twice per recursion. Unfortunately, I have no idea how to work a fold into this. Good luck!
Ah, I was trying to figure out how to use guards here, but I couldn't figure out the syntax. Thanks for the help! What's the best way to unit test this function? Quick-check? What would that look like? Joe