in reply to Binary search

I would use a cmp function with two arguments - this way it would be compatible with the cmp and sort standard library functions.