Nota Poin wrote on 02/11/2016 04:48 AM:
But there's no way I've ever been able to figure to produce generated text that
is just a flat list of strings, if I ever want to have conditional decisions
about what to go in that list.
You might like `quasiquote` and `unquote-splicing`:
`("a"
"b"
,@(if (= 2 (+ 1 1))
`("p"
"q")
`("x"
"y"))
"c"
"d")
;;=> ("a" "b" "p" "q" "c" "d")
BTW, for HTML-writing, maintaining HTML markup in string literals gets
to be a headache, and also tends to have bugs. I would use my
`html-writing` or `html-template` package.
http://www.neilvandyke.org/racket-html-writing/#%28part._.Writing_.H.T.M.L%29
http://www.neilvandyke.org/racket-html-template/
Neil V.
--
You received this message because you are subscribed to the Google Groups "Racket
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.