binary search (groovy)