On 8/9/07, <b class="gmail_sendername">ok</b> &lt;<a href="mailto:ok@cs.otago.ac.nz">ok@cs.otago.ac.nz</a>&gt; wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
We get extra &gt;&gt;, &gt;&gt;=, \, -&gt;, and &quot;in&quot; tokens, but no new parentheses.<br></blockquote></div><br>Yes exactly.&nbsp; It&#39;s the &gt;&gt;= and &gt;&gt; that gets rid of the parentheses, and reverses the order of the operations.
<br><br>I cant remember where I saw this, but somewhere there is a monad tutorial that starts really from the basics, which is that a &quot;do&quot; list is essentially something like:<br><br>f (g (h initialvalue ) )<br><br>
... which we can rewrite as something like:<br><br>h initialvalue |&gt; g |&gt; f<br><br>.. for a suitable definition of |&gt; , something like (off the top of my head, almost certainly wrong):<br><br>(|&gt;) f g = g f<br>
<br>