ArrayBinarySearch in scala