[racket] Printing multiple stmts in cond

From: Eli Barzilay (eli at barzilay.org)
Date: Sat Apr 30 01:49:40 EDT 2011

Three minutes ago, nikhil wrote:
> Hi,
> I am new to Racket so please bear with me. I am trying to print
> multiple expressions in "cond" statement as below.
> (let ((var `(make))
>         (exp '(1 2)))
>     (cond
>       [(number? 2) `(hi ,var)
>                               `(bye ,exp)]))
> But only the "bye" statement is returned/printed on the screen.  The
> first "hi" is not evaluated at all.

It is, it's just not printing anything or doing anything else since
its value is ignored.

> How do I return/print both ?


          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!

Posted on the users mailing list.