binSearch is now generic

@pmbohm complained that binSearch was not a generic function as it used `isAfter` - and he was totally right. Made this function generic now by taking a function that tests for inequality.