Skip to content

Commit 288b3d8

Browse files
authored
Fixed typo
1 parent 8828d79 commit 288b3d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

_overviews/scala3-book/types-dependent-function.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ The following calls to method `get` would now type check:
3333
```scala
3434
val db: DB = ...
3535
val res1: Option[String] = db.get(Name)
36-
val res2: Option[String] = db.get(Age)
36+
val res2: Option[Int] = db.get(Age)
3737
```
3838
Calling the method `db.get(Name)` returns a value of type `Option[String]`, while calling `db.get(Age)` returns a value of type `Option[Int]`.
3939
The return type _depends_ on the concrete type of the argument passed to `get`---hence the name _dependent type_.

0 commit comments

Comments
 (0)