RScheme, like Scheme itself, is a language with side-effects. However, a "mostly functional" style is encouraged.
Consider the two short lists, constructed as follows:
(set! a (list (make-bar 1) (make-foo 2))) (set! b (list (make-baz 3) (make-baz 4)))
The resulting structure is as follows:
Call the return value of (append a b) c, and you have the following circumstance. Note that the c and b lists share structure
On the other hand, if d is the result of calling (append! a b), then the following figure applies. Note that the a and d lists share structure in this case, in addition to the same kind of shared structure with the b list.