Consider the following code:
#!r6rs
(library
(test)
(export)
(import (rnrs))
(define a 5)
(begin
(define b 4)
(+ 3 b))
'cont
(define c 5)
'done)
From the R6RS Report 7.1:
A <library body> is like a <body> (see section 11.3) except that a <library body>s need not include any expressions. It must have the following form:
<definition> ... <expression> ...
I thought it would emit error because definition of c
is after expression 'cont
, but this program is accepted cleanly.
After Then, I thought a
and c
could be exported. But, not c
but b
can be exported. (a
can be exported as I thought.)
I think there are something I didn't realize about R6RS library rules. What is the point I'm missing? Thanks in advance.
p.s) I'm using Racket v5.3.3