[racket] Printing multiple stmts in cond

From: Neil Van Dyke (neil at neilvandyke.org)
Date: Sat Apr 30 03:00:35 EDT 2011

nikhil wrote at 04/30/2011 02:52 AM:
> Basically, I dont want to execute an else stmt or return multiple 
> values. I just want to return "stmt1" if condition satisfies and dont 
> do anything if false. No returning #<void> or anything.

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.)

If you can show *why* you don't want to produce *any* value, then people 
can show you different ways to write that code.

-- 
http://www.neilvandyke.org/


Posted on the users mailing list.