Last active
August 29, 2015 13:57
-
-
Save ymkjp/9721254 to your computer and use it in GitHub Desktop.
How to write `where`'s indent
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
| bmiTell :: Double -> Double -> String | |
| bmiTell weight height | |
| | bmi <= skinny = "You're underweight, you emo, you!" | |
| | bmi <= normal = "You're supporsedly normal.\ | |
| \ Pfft, I bet you're ugly!" | |
| | bmi <= fat = "You're fat! Lose some weight, fatty!" | |
| | otherwise = "You're a whale, congratulations!" | |
| where -- To new line | |
| bmi = weight / height ^ 2 | |
| skinny = 18.5 | |
| normal = 25.0 | |
| fat = 30.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment