Is there a shorthand in scheme for ((lambda () ))
For example, instead of
((lambda ()
(define x 1)
(display x)))
I would love to be able to do something like
(empty-lambda
(define x 1)
(display x))
Racket provides the block
form, which works like this:
#lang racket
(require racket/block)
(block
(define x 1)
(display x))
The usual idiom for that is
which you can of course turn into a quick macro: