<div>Ok. Here&#39;s what I am trying to do.</div><div><br></div><div>I am parsing incoming racket code and generating back racket code. </div><div><br></div><div>In my case, I have an incoming function which takes 4 arguments and I need to generate a function which takes in 5 args when a condition satisfies, if not then the original 4 args .</div>
<div><br></div><div>Something like,</div><div><br></div><div>Input--&gt; </div><div>(f x1 x2 x3 x4)</div><div><br></div><div>Output--&gt;</div><div>(FF x1 x2 xNEW x3 x4)</div><div><br></div><div>--------------------------------------------------</div>
<div><br></div><div><div>(define (parse-func exp)</div><div>   (cond</div></div><div>............</div><div><br></div><div><div>   [(f? exp)</div><div>       `(FF</div><div>         ,x1</div><div>         ,x2</div><div>         ,(if (condition?)</div>
<div>              xNEW)</div><div>       </div><div>         ,x3</div><div>         ,x4)]</div></div><div><br></div><div>(The above is just pseudo-code) As shown above, when the if condition fails I just want 4 args. But a default #&lt;void&gt; is passed instead when used with cond. </div>
<div><br></div><div>I am new to racket and functional programing in general, so I am not able to express my problem very accurately :(</div><div>Hope the above example is clear enough to explain what I am doing. </div><div>
<br></div><br><br><div class="gmail_quote">On Sat, Apr 30, 2011 at 7:00 AM, Neil Van Dyke <span dir="ltr">&lt;<a href="mailto:neil@neilvandyke.org">neil@neilvandyke.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
nikhil wrote at 04/30/2011 02:52 AM:<div class="im"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Basically, I dont want to execute an else stmt or return multiple values. I just want to return &quot;stmt1&quot; if condition satisfies and dont do anything if false. No returning #&lt;void&gt; or anything.<br>
</blockquote>
<br></div>
An expression always produces at least one value, even if the value is the void value.  (Usually, a REPL will hide a returned void value from you, but a void value is still being returned, which can be confusing.)<br>
<br>
If you can show *why* you don&#39;t want to produce *any* value, then people can show you different ways to write that code.<br><font color="#888888">
<br>
-- <br>
<a href="http://www.neilvandyke.org/" target="_blank">http://www.neilvandyke.org/</a><br>
</font></blockquote></div><br>