It's simple: inside a procedure, there's always an implicit begin
. So this:
(define (f x)
(begin
<expression 1>
<expression 2>
<returned value>))
... Is completely equivalent to this:
(define (f x)
<expression 1>
<expression 2>
<returned value>)
And no, there isn't any semantic difference, the second form above is just syntactic sugar for the first form. And the begin
form is necessary, because there has to be a way to perform a sequence of expressions just for their effect in the specified order. Remember: in a begin
(or for that matter, inside a procedure - it's the same) all the expressions get executed in the order they appear, their resulting values being essentially ignored, and only the last expression's value is returned at the end.