[racket] Splicing format string?
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:
(with-output-to-string
(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