10.4.2 Scheme (R6RS)

R6RS Scheme has mutable hash tables and ... that seems to be it.

Well, wait: there’s a little more to be said. Strings are immutable. Functional point update operations are not provided, presumably out of time complexity concerns, but string-append and substring are provided, and there are functions to convert to and from lists of characters; I guess the idea is that fine-grained string construction will be done using lists and then converted. Amusingly, there’s string-copy, though it’s hard to see why one would ever use it.

On first reading, it appears that pairs, and therefore lists, are immutable, so that lists are indeed a functional type. That would be great — but then one reads farther and finds the mutable-pairs library, which brings in set-car! and set-cdr!, which operate on the same pair type. So you can’t absolutely count on your lists not getting mutated.

Like CL, Scheme has a “deep equality” predicate equal?. This is very similar to CL’s equal, except that it compares vectors by content, even though they’re mutable.