typing question

Ben Ben <neb@one.net>
Sun, 13 May 2001 22:02:47 -0500


The following appears to work,

(@\@)   :: (Num a) => Polynomial a -> Polynomial a -> Polynomial a
f @\@ g = applyrec pp g 0
   where
	pp = map (\x -> toPolynomial [x]) (fromPolynomial f)
	applyrec (f:fs) g m = f * g^m + applyrec fs g (m+1)
	applyrec  []    _ _ = 0

Sorry for the original email, although I would be interested in a better
solution if there is any commentary.

Ben.


On Sun, May 13, 2001 at 09:43:31PM -0500, Ben wrote:
> Hello, I hope that a question here wont be too much of a bother.
> 
> Yesterday I wrote a library for polynomial manipulation. Everything is fine
> except for the composition operator. Which I having problems with, probably
> trivial, but as I don't program in Haskell everyday a solution isn't clear.
...etc.