1

i'm having an error in this piece of code

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

This is the ERROR that ghci give to me

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
   |                     ^

Thanks in advance StackOverflow programmers :D!

Willem Van Onsem
  • 443,496
  • 30
  • 428
  • 555
Javi Ortiz
  • 11
  • 2

0 Answers0