File tree 1 file changed +3
-3
lines changed
docs/docs/reference/enums
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -3,8 +3,8 @@ layout: doc-page
3
3
title : " Algebraic Data Types"
4
4
---
5
5
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
8
8
how an ` Option ` type can be represented as an ADT:
9
9
10
10
``` scala
@@ -34,7 +34,7 @@ Note that the parent type of the `None` value is inferred as
34
34
` Option[Nothing] ` . Generally, all covariant type parameters of the enum
35
35
class are minimized in a compiler-generated extends clause whereas all
36
36
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.
38
38
39
39
As for normal enum values, the cases of an ` enum ` are all defined in
40
40
the ` enum ` s companion object. So it's ` Option.Some ` and ` Option.None `
You can’t perform that action at this time.
0 commit comments