Binary Search in Scala