As mentioned, to get your macro to work, you have to change how the
reader behaves on "|".

You might be interested in the (implementation of) no-vert-bar reader lang:

https://docs.racket-lang.org/no-vert-bar-lang/index.html

On Mon, Feb 3, 2020 at 6:27 PM Kevin Forchione <lyss...@gmail.com> wrote:
>
> Hi guys,
> I’ve been  trying to figure out how to use “|” in a macro. I’ve got syntax 
> like this in mind:
>
>         (foo A | B)
>
> Not sure if I can do this because the reader expects a pair. If “|” isn’t a 
> convenient literal to work with is there an alternative others have used that 
> represents more or less the idea of “or” or “alternate”?
>
> Thanks!
>
> Kevin
>
> --
> 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 
> https://groups.google.com/d/msgid/racket-users/447100AA-DB45-46C3-A7DC-2705A1668302%40gmail.com.

-- 
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 
https://groups.google.com/d/msgid/racket-users/CAFfiA1%2Br-Hg_yn-hhbEaZBjTLn8-v5MvqqAVitMrjj7BEGi40w%40mail.gmail.com.

Reply via email to