[racket] Splicing format string?

From: Sam Tobin-Hochstadt (samth at ccs.neu.edu)
Date: Thu Sep 1 10:03:52 EDT 2011

On Thu, Sep 1, 2011 at 9:43 AM, J. Ian Johnson <ianj at ccs.neu.edu> wrote:
> I have a list of symbols '(a b c) that I want to be printed "a b c" as part of string I'm formatting.

> 2) Is there a better way to write my first attempt without changing format string?

Here is another possibility:

  (lambda () (for ([e (add-between '(a b c) " ")]) (display e))))

> 1) Would other people also like this as part of format strings?

Probably a new, more comprehensive, formatting library would be a
better thing to add than extending the existing `printf'.
sam th
samth at ccs.neu.edu

Posted on the users mailing list.