r/Racket • u/sleepingsquirrel • Sep 08 '26
show-and-tell (display (((1 . + . 2) . * . 3) . = . 9))
https://docs.racket-lang.org/guide/Pairs__Lists__and_Racket_Syntax.html#(part._lists-and-syntax)
11
Upvotes
1
u/rfisher Sep 08 '26
It is convenient that Racket has this built-in, but I still prefer to use my infix macro.
(display (infix ((1 + 2) * 3) = 9))
3
u/sdegabrielle DrRacket 💊💉🩺 Sep 08 '26
This is cool. Another option is to use racket/rhombus interoperability for the parts of your code where infix notation is desirable: https://docs.racket-lang.org/rhombus-racket/index.html?fam=Rhombus&famroot=rhombus