> On Jun 20, 2019, at 10:18 PM, Sorawee Porncharoenwase 
> <sorawee.pw...@gmail.com> wrote:
> #lang racket
> (require syntax/parse/define)
> (define-simple-macro (#%top . x) 'x)
> (define x 42)
> x ;=> 42
> y ;=> 'y
> (string-length (symbol->string abcdef)) ;=> 6
> Unbound identifiers are wrapped with #%top during expansion steps 
> <https://docs.racket-lang.org/reference/syntax-model.html?q=%23%25top#%28part._expand-steps%29>,
>  so you can define #%top to deal with unbound ids. For instance, Pollen 
> <https://pollenpub.com/> by default uses #%top to create default tags 
> <https://docs.racket-lang.org/reference/__top.html>.
> Wow! That does appear to be just what I’ve been looking for. 

Thanks so much!  Looks like I’m going to have some fun!


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.
To view this discussion on the web visit 
For more options, visit https://groups.google.com/d/optout.

Reply via email to