Created
December 8, 2015 00:17
-
-
Save JacobLeach/2d22e1a7fbc0471aefed to your computer and use it in GitHub Desktop.
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
bmiTell :: (RealFloat a) => a -> a -> String | |
bmiTell weight height | |
| bmi <= 18.5 = "You're underweight, you emo, you!" | |
| bmi <= 25.0 = "You're supposedly normal. Pffft, I bet you're ugly!" | |
| bmi <= 30.0 = "You're fat! Lose some weight, fatty!" | |
| otherwise = "You're a whale, congratulations!" | |
where bmi = weight / height ^ 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment