recursive binary search in swift