On Mar 28, 2009, at 7:39 PM, michael rice wrote:
Hi, I've been away from Haskell Land for a while, but I think the function cf below, given a list of Ints should calculate a continuous fraction. I'm using Hugs 98 and get errors when loading and also when trying to use the % operator at the command prompt (see below). What must I do to get this to work?
Michael
===============
cf :: [Int] -> Rational cf [] = 0 cf (x:[]) = 1 % x cf (x:xs) = x + (1 % cf xs)
Hugs> :load cf.hs ERROR "cf.hs":2 - Undefined variable "%" Hugs>
Hugs> 1 % 5 ERROR - Undefined variable "%" Hugs>
|
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe