在Learn You A Haskell一书中,有一个关于计算BMI的例子.
bmiTell :: (RealFloat a) => a -> a -> String
bmiTell weight height
| bmi <= skinny = "You're underweight, you emo, you!"
| bmi <= normal = "You're supposedly normal. Pffft, I bet you're ugly!"
| bmi <= fat = "You're fat! Lose some weight, fatty!"
| otherwise = "You're a whale, congratulations!"
where bmi = weight / height ^ 2
(skinny, normal, fat) = (18.5, 25.0, 30.0)
Run Code Online (Sandbox Code Playgroud)
当我试图自己做这个例子时,我用作(Num a) => a …
例如,类"fa-square-o"和"fa-square"如何彼此不同?我在哪里可以找到有关font-awesome类名约定的更多信息?我在他们的网站上搜索过,但找不到有关字体 - 令人敬畏的类命名约定的具体指导.
例如:如果我想像url Content-Type一样传递application/json,我该怎么做?
我确实了解邮递员,但使用得很少。我想知道是否可以使用chrome本身做我需要做的事情,而无需使用POSTMAN。
css ×1
css3 ×1
font-awesome ×1
haskell ×1
http ×1
http-headers ×1
postman ×1
typeclass ×1
url ×1