Is there a better or functional way to compare 2 values in a map in Scala?
问题 I have functions which allow the user to compare two teams contained within a map. The data contained in the map is read in from a text file which contains information about football teams and their points tallies for the past 5 seasons. The data is stored as Map[String, List[Int]]: Manchester United, 72, 86, 83, 90, 94 Manchester City, 80, 84, 91, 77, 88 Chelsea, 76, 85, 92, 87, 84 Arsenal, 70, 79, 81, 76, 83 Liverpool, 69, 77, 80, 73, 79 The functions below allow the user to enter the names