Skip to content

Conversation

@sumanthyedoti
Copy link

Guards

bmiTell bmi
  | bmi <= 18.5 = 'Underweight'
  | bmi <= 25.0 = 'Normal'
  | bmi <= 30.0 = 'Fatty'
  | otherwise   = 'Index overflow'

where

bmiTell weight height
  | bmi <= skinny = 'Underweight'
  | bmi <= normal = 'Normal'
  | bmi <= fat = 'Fatty'
  | otherwise   = 'Index overflow'
  where bmi = weight / height ^ 2
        skinny = 18.5
        normal = 25.0
        fat = 30.0


incAndSq x = sq (x + 1)
  where sq x = x * x

@sumanthyedoti sumanthyedoti changed the base branch from master to dev April 27, 2022 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant