More fixes

pull/664/head
Arijit Basu 10 months ago
parent 3fcfb1dbef
commit f84d9d5c6a
No known key found for this signature in database
GPG Key ID: 0F8EF5258DC38077

@ -35,8 +35,8 @@ enum Result {
}
```
Here, `Result` can be one of two the possible values: "Ok" and "Err" (just like
`boolean`, but tagged):
Here, `Result` can be one of two the possible values: `Ok` and `Err` (just like
`boolean`, but tagged).
We'd document it here as:
@ -62,8 +62,8 @@ We'd document it here as:
> - { Ok = bool }
> - { Err = "string" }
Here, `Result` still has only two possibilities, but unlike bool, each
possibility here is tagged, and has further set of possible value(s).
Here, `Result` still has only two possibilities, but unlike the first example,
each possibility here has further set of possible value(s).
And there you go. This is exactly what sum types are - glorified enums that can
have nested types in each branch.

Loading…
Cancel
Save