Binary search in Swift and rename generics