I have two functions
> fos :: Num a -> [a] -> [a]
> fos a x = fos' a 0 x
> fos' :: Num a -> a -> [a] -> [a]
> fos' _ _ [] = []
> fos' a y1 (x:xs) = y : fos' a y xs
> where y = a * y1 + x
Why does
> fos -0.5 [ 1, 1, 1, 1 ]
give me
[a] -> b -> [b] -> [b] is not an instance of class "Fractional"
while
> fos (-0.5) [ 1, 1, 1, 1 ]
evaluates just fine? I'm using Hugs 1.4. Thanks.
--
Matt Donadio ([EMAIL PROTECTED]) | 43 Leopard Rd, Suite 102
Sr. Software Engineer | Paoli, PA 19301-1552
Image & Signal Processing, Inc. | Phone: +1 610 407 4391
http://www.isptechinc.com | FAX: +1 610 407 4405