Hi,

Is there any way I can use the terse forms of quasiquote with at-exp?

I want to use @expressions{} inside a quasi quoted list, but the unquote
comma captures the at-sign at ,@a~{}

I'm trying to achieve the following with the at-exp

;working example
#lang at-exp racket
(require racket/random)
(define (path)
  (random-ref '["stream""brook" "path" "ravine" "forest" "fence" "stone
wall"]))

(~a "beyond the " (path) ", ")
@~a{beyond the @(path), }


(random-ref
 `(
   ,(~a "beyond the " (path) ", ")
  ;,@~a{beyond the @(path) })
   ,(~a "along the " (path) ", ")
  ;,@~a{beyond the @(path) })
   ))

My reason is I find at-expressions more readable.

Kind regards,

Stephen

PS: Ive been very excited by at-exp since I read
http://www.greghendershott.com/2015/08/at-expressions.html
I despise double escaping, because I always make a mistake, so this made me
very happy:

@pregexp{\d\.\d}  ; #px"\\d\\.\\d"

-- 
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.

Reply via email to