<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">I'm not sure if my terminology is correct or even if my question makes sense, but I can create "instances" of Maybe, List, IO, and Either.<br><br>Prelude Data.Either&gt; let m = Just 7<br>Prelude Data.Either&gt; :t m<br>m :: Maybe Integer<br><br>Prelude Data.Either&gt; let l = 2:[]<br>Prelude Data.Either&gt; :t l<br>l :: [Integer]<br><br>Prelude Data.Either&gt; let g = getLine<br>Prelude Data.Either&gt; :t g<br>g :: IO String<br><br>Prelude Data.Either&gt; let e = Right "abc"<br>Prelude Data.Either&gt; :t e<br>e :: Either a [Char]<br><br>All these instances are functors, each with its own version of fmap that can be applied to it.<br><br>How can I similarly create an instance of (-&gt;) so I can apply (-&gt;)'s version of fmap<br><br>instance Functor ((-&gt;) r) where&nbsp; <br>&nbsp;&nbsp;&nbsp; fmap f g = (\x -&gt; f (g x))<br><br>to
 it?<br><br>Michael<br><br>--- On <b>Tue, 8/31/10, Vo Minh Thu <i>&lt;noteed@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: Vo Minh Thu &lt;noteed@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: Tuesday, August 31, 2010, 1:50 PM<br><br><div class="plainMail">2010/8/31 michael rice &lt;<a ymailto="mailto:nowgate@yahoo.com" href="/mc/compose?to=nowgate@yahoo.com">nowgate@yahoo.com</a>&gt;<br>&gt;<br>&gt; So it's a type constructor, not a type? Could you please provide a simple example of its usage?<br><br>Sure, although I'm sure you've come by some already.<br><br>-- the identity function<br>id :: a -&gt; a<br>-- often, we write it like this:<br>-- id x = x<br>-- but here we see the relationship between the ananymous function<br>syntax and the function
 type:<br>id = \x -&gt; x<br><br>In fact, if you write in prefix form, it is quite familiar:<br>f :: (-&gt;) Int Bool<br>e = Either String Float<br><br>Cheers,<br>Thu<br><br>&gt; Michael<br>&gt;<br>&gt; --- On Tue, 8/31/10, Vo Minh Thu &lt;<a ymailto="mailto:noteed@gmail.com" href="/mc/compose?to=noteed@gmail.com">noteed@gmail.com</a>&gt; wrote:<br>&gt;<br>&gt; From: Vo Minh Thu &lt;<a ymailto="mailto:noteed@gmail.com" href="/mc/compose?to=noteed@gmail.com">noteed@gmail.com</a>&gt;<br>&gt; Subject: Re: [Haskell-cafe] On to applicative<br>&gt; To: "michael rice" &lt;<a ymailto="mailto:nowgate@yahoo.com" href="/mc/compose?to=nowgate@yahoo.com">nowgate@yahoo.com</a>&gt;<br>&gt; Cc: <a ymailto="mailto:haskell-cafe@haskell.org" href="/mc/compose?to=haskell-cafe@haskell.org">haskell-cafe@haskell.org</a><br>&gt; Date: Tuesday, August 31, 2010, 1:17 PM<br>&gt;<br>&gt; 2010/8/31 michael rice &lt;<a ymailto="mailto:nowgate@yahoo.com"
 href="/mc/compose?to=nowgate@yahoo.com">nowgate@yahoo.com</a>&gt;<br>&gt; &gt;<br>&gt; &gt; "Learn You a Haskell ..."&nbsp; says that (-&gt;) is a type just like Either. Where can I find its type definition?<br>&gt;<br>&gt; You can't define it *in* Haskell as user code. It is a built-in infix<br>&gt; type constructor (Either or Maybe are type constructors too, not just<br>&gt; types). In fact, if you want to implement a simple, typed functional<br>&gt; language, you'll find it is the only built-in type constructor you<br>&gt; have to implement (as the implementor of the language).<br>&gt;<br>&gt; Also,<br>&gt; &nbsp; Show a =&gt; a<br>&gt; is a type too, but you won't find a definition for 'a' or for '=&gt;'.<br>&gt; All those things are defined by the language.<br>&gt;<br>&gt; Cheers,<br>&gt; Thu<br>&gt;<br></div></blockquote></td></tr></table><br>