Created
May 3, 2016 08:12
-
-
Save b4284/e399dcbf8eff31b8269b624dfc63fb31 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| type gender = Man | Woman | |
| type human = Any of gender | Special of gender * string | B4283 | |
| type marry_result = HappilyEverAfter | ForeverAlone | DontKnowHowToMakeLoveStop | |
| let marry x y = match (x, y) with | |
| | (B4283, B4283) -> DontKnowHowToMakeLoveStop | |
| | (Special (ag, an), Special (bg, bn)) | |
| when ag = bg && an = bn -> DontKnowHowToMakeLoveStop | |
| | (B4283, _) -> ForeverAlone | |
| | (_, B4283) -> ForeverAlone | |
| | _ -> HappilyEverAfter |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment