Andreas Grech
Andreas Grech

Reputation: 107940

Syntax changes from the examples in 'The Little Schemer' to the real Scheme

I have recently started following the examples from The Little Schemer and when trying out the examples in DrScheme, I have realised that there are some minor syntax changes from the examples in the book to what I can write in DrScheme.

First of all, as a language in DrScheme, I chose Pretty Big (one of the Legacy Languages).
Is this the correct choice for trying the examples in the book?


As regards the syntax changes I have noticed that, for example, I need to prefix the identifiers with a ' in order for them to work.

For example:

(rember 'jelly '(peanut butter jelly))

Are there any more changes (syntactical or not) that I need to be aware of when trying the examples from the 'The Little Schemer' book ?

Upvotes: 3

Views: 508

Answers (2)

Eli Barzilay
Eli Barzilay

Reputation: 29546

IIRC, the book uses a different font for quoted pieces of data, and in real Scheme code that requires using quote. As for your use of PLT Scheme -- the "Pretty Big" language is really there just as a legacy language. You should use the Module language, and have all files start with #lang scheme (which should be there by default).

(The "new" way of using different languages in DrScheme is to always be in the Module "language" and specify the actual language using a #lang line.)

Upvotes: 5

Darius Bacon
Darius Bacon

Reputation: 15124

See the "Guidelines for the reader" section in the Preface. (I'm looking at the 4th edition here.)

Upvotes: 2

Related Questions