[racket] Can you avoid voids in quasiquote?

From: Sam Tobin-Hochstadt (samth at cs.indiana.edu)
Date: Tue Jan 28 14:22:50 EST 2014

On Tue, Jan 28, 2014 at 2:20 PM, Matthew Butterick <mb at mbtype.com> wrote:
> I frequently write quasiquoted xexprs that contain this kind of pattern:
>
> `(p "foo" "bar" ,(when test-condition (do-something)))


I would write:

`(p "foo" "bar" ,@(if test-condition (list (do-something)) null))

Sam

Posted on the users mailing list.