<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Yeah, I figured as much, but the code is copied right off the referenced page.<br><br>Michael<br><br><br>--- On <b>Thu, 8/26/10, Ivan Lazar Miljenovic <i>&lt;ivan.miljenovic@gmail.com&gt;</i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Ivan Lazar Miljenovic &lt;ivan.miljenovic@gmail.com&gt;<br>Subject: Re: [Haskell-cafe] On to applicative<br>To: "michael rice" &lt;nowgate@yahoo.com&gt;<br>Cc: haskell-cafe@haskell.org<br>Date: Thursday, August 26, 2010, 2:02 AM<br><br><div class="plainMail">On 26 August 2010 15:56, michael rice &lt;<a ymailto="mailto:nowgate@yahoo.com" href="/mc/compose?to=nowgate@yahoo.com">nowgate@yahoo.com</a>&gt; wrote:<br>&gt;<br>&gt; From: <a href="http://en.wikibooks.org/wiki/Haskell/Applicative_Functors"
 target="_blank">http://en.wikibooks.org/wiki/Haskell/Applicative_Functors</a><br>&gt;<br>&gt; =============================<br>&gt; import Control.Applicative<br>&gt;<br>&gt; f :: (a -&gt; b -&gt; c)<br>&gt; fmap :: Functor f =&gt; (d -&gt; e) -&gt; f d -&gt; f e<br>&gt; fmap f :: Functor f =&gt; f a -&gt; f (b -&gt; c)&nbsp;&nbsp;&nbsp; -- Identify d with a, and e with (b -&gt; c)<br>&gt;<br>&gt; sumsqr :: Int -&gt; Int -&gt; Int&nbsp;&nbsp;&nbsp; -- my f<br>&gt; sumsqr i j = i*i+j*j<br>&gt; =============================<br><br>The line with the error is the one beginning with "fmap f :: ..."; you<br>can't provide a variable/parameter on the left hand side of the ::<br><br>Also, why are you trying to re-define fmap?<br><br>--<br>Ivan Lazar Miljenovic<br><a ymailto="mailto:Ivan.Miljenovic@gmail.com" href="/mc/compose?to=Ivan.Miljenovic@gmail.com">Ivan.Miljenovic@gmail.com</a><br>IvanMiljenovic.wordpress.com<br></div></blockquote></td></tr></table><br>