Folks,

I have an example of the do-syntax that I would like to desugar.  It is an example from Chapter 28 in RWH.

I think I understand the ideas behind the following STM example, but I would like to present it to others in a desugared way:

tryBogusSale = do
    players@(alice:bob:_) <- atomically populateWorld
    atomically $ alwaysSucceeds =<< consistentBalance players
    bogusSale Wand 5 alice bob

I'm having problems especially with the 2nd line in the do block (i.e. the predicate for alwaysSucceeds).  I would like to try and express this in terms of only bind (->) and return.

thanks!
Michael

--
----------------------
Michael Easter
http://codetojoy.blogspot.com: Putting the thrill back in blog

http://youtube.com/ocitv -> Fun people doing serious software engineering