Skip to content

Instantly share code, notes, and snippets.

@souhe
Created November 22, 2018 22:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save souhe/fa18b4f8bec4405440169af5d99bcf99 to your computer and use it in GitHub Desktop.
Save souhe/fa18b4f8bec4405440169af5d99bcf99 to your computer and use it in GitHub Desktop.
type review =
| Bad(string)
| Neutral
| Awesome;
let getAnswer = review =>
switch (review) {
| Bad(comment) => "That is sad that you think: " ++ comment
| Neutral => "Okay"
| Awesome => "Yes yes yes!"
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment