我在这段代码中出错了
raices :: Double -> Double -> Double -> [Double]
raices a b c = [(-b+d)/t,(-b-d)/t]
where d = sqrt (b^2 - 4*a*c)
t = 2*a
这是ghci给我的错误
parse error on input ‘=’
Perhaps you need a 'let' in a 'do' block?
e.g. 'let x = 5' instead of 'x = 5'
|
174| t = 2*a
| ^
先谢谢StackOverflow程序员:D!