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) => user.name)

map(List(1,2,3,4), (x: Int) => x + 1)
```

---
# Generic function

<br>

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

``