<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div>I personally find <br>map maySwitch (unfoldr go (x1,y1,0)) and map maySwitch $ unfoldr go (x1,y1,0) more intuitive.<br><br>I can read it as map the maySwitch function over the list generated from the unfolding.<br><br>Is there any difference in the evaluation steps between the composition version and the non-composition version?<br><br>Regards,<br>Kashyap<br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> david48 &lt;dav.vire+haskell@gmail.com&gt;<br><b><span style="font-weight: bold;">To:</span></b> Ryan Ingram &lt;ryani.spam@gmail.com&gt;<br><b><span style="font-weight:
 bold;">Cc:</span></b> Johan Tibell &lt;johan.tibell@gmail.com&gt;; haskell-cafe@haskell.org; CK Kashyap &lt;ck_kashyap@yahoo.com&gt;<br><b><span style="font-weight: bold;">Sent:</span></b> Friday, July 31, 2009 11:56:17 AM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [Haskell-cafe] Need feedback on my Haskell code<br></font><br>
On Fri, Jul 31, 2009 at 5:53 AM, Ryan Ingram&lt;<a ymailto="mailto:ryani.spam@gmail.com" href="mailto:ryani.spam@gmail.com">ryani.spam@gmail.com</a>&gt; wrote:<br><br>&gt; Read ($) as a parenthesis that extends as far to the right as<br>&gt; possible; so you can write, for example:<br><br>That doesn't always work, for example :<br><br>map (+2) . map (*1) $ [1,2,3]<br>= [4,6,8]<br><br>Now replacing the $ by a parenthesis that extends as far to the right<br>as possible :<br><br>map (+2) . map (*1) ( [1,2,3] )<br><br>&lt;interactive&gt;:1:11:<br>&nbsp; &nbsp; Couldn't match expected type `a -&gt; [a1]'<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  against inferred type `[a2]'<br>&nbsp; &nbsp; In the second argument of `(.)', namely `map (* 2) ([1, 2, 3])'<br>&nbsp; &nbsp; In the expression: map (+ 2) . map (* 2) ([1, 2, 3])<br>&nbsp; &nbsp; In the definition of `it': it = map (+ 2) . map (* 2) ([1, 2, 3])<br></div></div></div><br>



      </body></html>