Definitions may also occur at the beginning of a body.
These are known as internal definitions.
The variable defined by an internal definition is local to the
body.
The region of the binding is the entire body. For example,
(let ((x 5))
(define foo (lambda (y) (bar x y)))
(define bar (lambda (a b) (+ (* a b) a)))
(foo (+ x 3))) 45
A body containing internal definitions may always be converted
into a completely equivalent letrec expression. For example, the
let expression in the previous example is equivalent to
(let ((x 5))
(letrec ((foo (lambda (y) (bar x y)))
(bar (lambda (a b) (+ (* a b) a))))
(foo (+ x 3))))
Just as for the equivalent letrec expression, it shall be
possible to evaluate each expression of every internal
definition in a body without referring to
the value of any variable being defined.