[racket] [scribble] pipe in code

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Tue Nov 22 15:01:16 EST 2011

At Tue, 22 Nov 2011 16:14:55 -0300, Eric Tanter wrote:
> @racketblock[
> <list> ::= '()
>          | (cons <val> <list>)
> ]

While `scribble/bnf' is a better approach, you could use

 @(define IS (tt "::="))
 @(define OR (tt " | "))
 @racketblock[
 <list> @#,IS '()
        @#,OR (cons <val> <list>)
 ]



Posted on the users mailing list.