changeset 284 | 9a04eb6a2291 |
parent 259 | 43995ea34fe7 |
--- a/marking2/danube_test5.scala Tue Oct 29 23:56:13 2019 +0000 +++ b/marking2/danube_test5.scala Wed Oct 30 11:28:44 2019 +0000 @@ -1,9 +1,10 @@ // first test +import CW7b._ def urban_groupById(ratings: List[(String, String)]) = - ratings.groupBy(_._1).mapValues(_.map(_._2)) + ratings.groupBy(_._1).view.mapValues(_.map(_._2)).toMap def urban_get_csv_file(name: String) : List[String] = { import io.Source