Skip to content

Commit d5bdeee

Browse files
authored
Merge pull request #3 from tegonal/doc-adt
doc(adt): link to enum
2 parents ff476f7 + 72cef28 commit d5bdeee

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/docs/reference/enums/adts.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ layout: doc-page
33
title: "Algebraic Data Types"
44
---
55

6-
The `enum` concept is general enough to also support algebraic data
7-
types (ADTs) and their generalized version (GADTs). Here's an example
6+
The [`enum` concept](./enums.html) is general enough to also support algebraic data
7+
types (ADTs) and their generalized version (GADTs). Here is an example
88
how an `Option` type can be represented as an ADT:
99

1010
```scala
@@ -34,7 +34,7 @@ Note that the parent type of the `None` value is inferred as
3434
`Option[Nothing]`. Generally, all covariant type parameters of the enum
3535
class are minimized in a compiler-generated extends clause whereas all
3636
contravariant type parameters are maximized. If `Option` was non-variant,
37-
you'd need to give the extends clause of `None` explicitly.
37+
you would need to give the extends clause of `None` explicitly.
3838

3939
As for normal enum values, the cases of an `enum` are all defined in
4040
the `enum`s companion object. So it's `Option.Some` and `Option.None`

0 commit comments

Comments
 (0)