-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
61 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,27 @@ | ||
type band = | ||
| Rush | ||
| Yes | ||
| KingCrimson [@config (made_up = true)] | ||
| KingCrimson [@config (made_up = "false")] | ||
|
||
(* this pattern matching is exhaustive because the config removes the | ||
KingCrimson constructor *) | ||
let best_band_in_the_world x = | ||
match x with | ||
| Rush -> true | ||
| Yes -> false | ||
| KingCrimson -> false [@config (made_up = "false")] | ||
|
||
and worst_band_in_the_world = function | ||
| Rush -> false | ||
| Yes -> false | ||
| KingCrimson -> true [@config (made_up = "false")] | ||
|
||
type band_polyvar = [ | ||
| `Rush | ||
| `Yes | ||
| `KingCrimson [@config (made_up=true)] | ||
| `KingCrimson [@config (made_up = true)] | ||
] | ||
|
||
let the_best_band_in_the_world (x: band_polyvar) = | ||
match x with | ||
| `Rush -> true | ||
| `Yes -> false | ||
| `KingCrimson -> false [@config (made_up = true)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters