source code: https://github.com/AlexKnauth/no-vert-bar-lang
A racket lang-extension that reads | as a normal character.
It takes another language as an argument, so that #lang no-vert-bar racket is a language like racket but without the special behavior for |.
#lang no-vert-bar racket (define (P-A|B P-A P-B P-B|A) (* P-B|A (/ P-A P-B))) (define (|| a b) (or a b)) (define |0> (vector-immutable 1 0)) (define |1> (vector-immutable 0 1))
These all treat the | like it was any other character, so that it doesn’t interfere with how you name your identifiers.
A racket lang-extension that reads \ as a normal character.
Just like with no-vert-bar, #lang no-backslash racket would declare a language like racket but without the special behavior for \.
#lang no-backslash racket (define (/\ a b) (and a b)) (define (\/ a b) (or a b))