0
我在以下bmiTell上得到parse error
为什么?haskell新手这个CLI有什么问题bmiTell函数
Prelude> :{
Prelude| let bmiTell :: Double -> Double -> String
Prelude| bmiTell weight height
Prelude| weight/height^2 <= 18.5 = "You're underweight, you emo, you!"
Prelude| weight/height^2 <= 25.0 = "You're supposedly normal. Pffft, I bet you're ugly!"
Prelude| weight/height^2 <= 30.0 = "You're fat! Lose some weight, fatty!"
Prelude| otherwise = "You're a whale, congratulations!"
Prelude| :}
<interactive>:19:1: parse error on input `bmiTell'
你应该真的把这个函数长时间地输入到一个文件中,并将其加载到ghci中,而不是尝试将整个东西输入到ghci中。 – DiegoNolan