3 ms·
FWIW a user can add this syntax himself to a language if he needs to. A hypothetical `curly-infix` language could be used like this: #lang curly-infix rac
by soegaard 5y ago
FWIW a user can add this syntax himself to a language if he needs to.
A hypothetical `curly-infix` language could be used like this:
#lang curly-infix racket
(define (fact n) (if (= n 0) 1 {n * fact(n-1)}))
The reader for `curly-infix` can use a read-table to alter how
`{<infix-expression>}` is read. The result can the be passed
to the language after the `#lang curly-infix` which in the
example is just `racket`, but could be something else.
Hmmm. Maybe I should make a `curly-infix` wrapping `infix` from my `infix` package.