8.18
top
← prev up next →

no-vert-bar-langπŸ”— i

source code: https://github.com/AlexKnauth/no-vert-bar-lang

1#lang no-vert-barπŸ”— i

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 |.

 
(define(P-A|BP-AP-BP-B|A)
(*P-B|A(/P-AP-B)))
 
(define(||ab)
(orab))
 
(define|0>
(vector-immutable10))
(define|1>
(vector-immutable01))

These all treat the | like it was any other character, so that it doesn’t interfere with how you name your identifiers.

2#lang no-backslashπŸ”— i

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 \.

 
(define(/\ab)
(andab))
 
(define(\/ab)
(orab))
top
← prev up next →

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /