PasteRack.org
Paste # 13646
2015-03-29 00:52:08

Fork as a new paste.

Paste viewed 66 times.


Embed:

  1. #lang racket
  2.  
  3. (require (for-syntax syntax/parse
  4.                      syntax/to-string))
  5.  
  6. (define-syntax (raw-string stx)
  7.   (syntax-parse stx
  8.     [(_ c:id ...)
  9.      #`(string #,@(for/list ([s (attribute c)])
  10.                     (displayln s)
  11.                     (define c (string-ref (syntax->string #`(#,s)) 0))
  12.                     (displayln c)
  13.                     #`#,c))]))

=>