<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hi Curt,<br><br>Thanks for the tips. Looks like return () would be a good candidate for that null statement I was seeking earlier.<br><br>Michael<br><br>--- On <b>Sun, 10/25/09, Curt Sampson <i><email@example.com></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Curt Sampson <firstname.lastname@example.org><br>Subject: Re: [Haskell-cafe] Is there a null statement that does nothing?<br>To: "michael rice" <email@example.com><br>Cc: "firstname.lastname@example.org" <email@example.com><br>Date: Sunday, October 25, 2009, 12:08 AM<br><br><div class="plainMail">On 2009-10-21 18:27 -0700 (Wed), michael rice wrote:<br><br>> Those nested IF/THEN/ELSEs are real killers. I kind of use them to<br>> sort out my thoughts, then end up with a nested mess. The
restructuring<br>> to WHENs went smoothly and looks a lot cleaner besides.<br><br>Indeed. Monadic control flow is one of the basic keys to being able<br>to write nice code in Haskell; it's the moral equivalant of using<br>polymorphism rather than than "case" or "switch" in OO languages. (Well,<br>some would disagree, but that gets into the whole OO vs. functional<br>debate.)<br><br>You'll probably want to spend some time with one of the zillion monad<br>tutorials at some point (I like "All About Monads") to learn more about<br>these things.<br><br>BTW, look up the source code for "when". :-)<br><br> <a href="http://haskell.org/ghc/docs/latest/html/libraries/base/src/Control-Monad.html#when" target="_blank">http://haskell.org/ghc/docs/latest/html/libraries/base/src/Control-Monad.html#when</a><br><br>cjs<br>-- <br>Curt Sampson <<a ymailto="mailto:firstname.lastname@example.org"
href="/email@example.com">firstname.lastname@example.org</a>> +81 90 7737 2974<br> Functional programming in all senses of the word:<br> <a href="http://www.starling-software.com" target="_blank">http://www.starling-software.com</a><br></div></blockquote></td></tr></table><br>