And I have sent the email before it was finished, oops.
Evaluating at integer values works fine, but trying to do
*Main> let a = [-1,2,-6,2]
*Main> horner a 1.23
gives this error
<interactive>:4:10:
No instance for (Fractional Integer)
arising from the literal `1.23'
Possible fix: add an instance declaration for (Fractional Integer)
In the second argument of `horner', namely `1.23'
In the expression: horner a 1.23
In an equation for `it': it = horner a 1.23
I know it has something to do with types, but whenever I try to add a type signature to the functions it just messes everything up even more. Any help would be appreciated
Thanks,
Andrew