Adding Linear Search in Scala