seven-right[
<img src="../img/foundation/list-inference.svg" alt="Parametric list" style="width:400px;"/>
]

---
# Generic functions in Dotty

<br>

```scala
def map[A](list: List[A], update: A => A): List[A]
```

<br>

```scala
val users = List(User("John", 23), User("Eda", 37), User("Bob", 18))
```

```scala
map(users, (user: User) => user.name)
// Type Mismatch Error:
// map(users, (user: User) => user.name)
//                            ^^^^^^^^^
//                            Found:    (user.name : Stri