<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">A "map" can be a function (applied to a (single) value).<br><br>Got it.<br><br>Thanks,<br><br>Michael<br><br><br>--- On <b>Fri, 8/27/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: Friday, August 27, 2010, 8:46 PM<br><br><div class="plainMail">On 28 August 2010 10:38, 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; fmap seems oddly named because no "mapping" takes place, except in the fourth example, where the map is "passed in." Just
 sayin'.<br><br>*ahem* <a href="http://en.wikipedia.org/wiki/Map_%28mathematics%29" target="_blank">http://en.wikipedia.org/wiki/Map_%28mathematics%29</a><br><br>&gt; Prelude Control.Monad Control.Applicative Data.Char&gt; fmap toUpper getLine<br>&gt;<br>&gt; &lt;interactive&gt;:1:13:<br>&gt; &nbsp;&nbsp;&nbsp; Couldn't match expected type `Char' against inferred type `[Char]'<br>&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Expected type: IO Char<br>&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Inferred type: IO String<br>&gt; &nbsp;&nbsp;&nbsp; In the second argument of `fmap', namely `getLine'<br>&gt; &nbsp;&nbsp;&nbsp; In the expression: fmap toUpper getLine<br><br>Right; this is because the fmap only gets the "Char -&gt; Char" function<br>inside the IO; but since it's "IO String" rather than "IO Char", this<br>doesn't type-check.<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>