<div dir="ltr">map is specialized for lists while fmap is for any functors. Its presence is historical. Prefer fmap over map.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Nov 12, 2015 at 7:03 PM, Dennis Raddle <span dir="ltr"><<a href="mailto:dennis.raddle@gmail.com" target="_blank">dennis.raddle@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Just after I posted that question, I started driving home, and on the drive I thought of your answer. I think I'm starting to ask the right questions when I'm programming in Haskell. Like redundancy and bloat is a sure sign that a more witty expression is available, and that I should consult the typeclasses. <div><br></div><div>Second, I am not used to the implications of laziness, so it took me a while to hit on your solution because I keep thinking you have to map something over the whole list, and that if you only want to map it over the head, you are stuck. </div><div><br></div><div>You can use 'map' also, instead of 'fmap', right? Is 'map' just 'fmap' for lists?</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>D</div><div><br></div></font></span></div>
<br>_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org">Beginners@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners</a><br>
<br></blockquote></div><br></div>