.name)
// map(users, _.name)
//            ^
```

---
# Generic function

<br>

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

```scala mdoc:reset:invisible
def map[From, To](list: List[From])(update: From => To): List[To] = list.map(update)
```

<br>

```scala mdoc:invisible
case class User(name: String, age: Int)
```

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

```scala mdoc
map(users)(user => user.name)

map(users)(_.name