Given this code 

```
val list = List(
    Person("John", "Paris", 1956);
    Person("Jane", "London", 1954);
    Person("James", "Paris", 1972);
    Person("Marie", "London", 1959);
)

```

I want to create a map(key->value), in which the key is the city, and the value is the average age of the persons living in that city. 

I have used the groupBy method : 

```
val groupedByCity = list.groupBy(_.city);

```

Which give me this : 

```
Map(Paris -> List(Person(Jonh, Paris, 1956), Person(James, Paris, 1972)), London -> List( Person(Jane, London, 1954), Person(Marie, London, 1959)));

```

How can I remap this to filter the information I need, which is the average age by city ? 

Thank you for your help.