<br clear="all">Folks,<br><br>I have an example of the do-syntax that I would like to desugar.&nbsp; It is an example from Chapter 28 in RWH.<br><br>I think I understand the ideas behind the following STM example, but I would like to present it to others in a desugared way:<br>
<br>tryBogusSale = do<br>&nbsp;&nbsp;&nbsp; players@(alice:bob:_) &lt;- atomically populateWorld<br>&nbsp;&nbsp;&nbsp; atomically $ alwaysSucceeds =&lt;&lt; consistentBalance players<br>&nbsp;&nbsp;&nbsp; bogusSale Wand 5 alice bob<br><br>I&#39;m having problems especially with the 2nd line in the do block (i.e. the predicate for alwaysSucceeds).&nbsp; I would like to try and express this in terms of only bind (-&gt;) and return.<br>
<br>thanks!<br>Michael<br><br>-- <br>----------------------<br>Michael Easter<br><a href="http://codetojoy.blogspot.com">http://codetojoy.blogspot.com</a>: Putting the thrill back in blog<br><br><a href="http://youtube.com/ocitv">http://youtube.com/ocitv</a> -&gt; Fun people doing serious software engineering<br>