---------------------------------------------------------------------- module CoeffPoly where ---------------------------------------------------------------------- -- COMP2600 -- Assignment 1, 2003 -- Skeleton script -- Represent a polynomial as a list of coefficients, such that the -- exponent of each term corresponds to the list index of each component. type Coeff = Float type Expon = Int type Poly = [Coeff] ---------------------------------------------------------------------- add :: Poly -> Poly -> Poly ---------------------------------------------------------------------- > sub :: Poly -> Poly -> Poly ---------------------------------------------------------------------- eval :: Float -> Poly -> Float ----------------------------------------------------------------------