Binary search specification:
Implement binary search in a function called binary_search that takes a sorted array as a parameter and a value. If the value occurs in the array, return the index at which it occurs in the array (if multiple occur, any index is fine). If it does not occur, return nil. You may assume that the value and the entries in the array support the comparison operators.
You should time how long each part takes you (writing tests and writing the function) regardless of which order you've been asked to do it. To do this, write down what time it is each time you start/end a new task.
ruby -I lib test/test_binary_search.rb (assuming you're in the base directory)