I'm curious about the return value of define
in Scheme. So I wrote the following lines in Racket
#lang r5rs
(display (define a 3))
And get the error
define: not allowed in an expression context in: (define a 3)
I have 2 questions about this:
- Does it mean that
define
has no return value? - According to R5RS,
define
is not an expression. It's a program structure. Is it true that only expressions have return values, and other forms don't?