Fundamentals of CS I (CS151 2002F)
Primary:
[Skip To Body]
[Front Door]
[Current]
[Glance]
[Honesty]
[Instructions]
[Links]
[Search]
[Syllabus]
Groupings:
[Examples]
[Exams]
[Handouts]
[Homework]
[Labs]
[Outlines]
[Readings]
[Reference]
ECA:
[About]
[Grades]
[Quizzes]
[Submit Work]
[Change Password]
[Reset Password]
Miscellaenous:
[Scheme Reference]
[CS151 2002F Gum]
[CS151 2001S]
[SamR]
[Glimmer Labs]
[schemers.org]
While your initial exercises in Scheme have been numeric, Scheme is not limited to numerical computation, but can also operate on pure symbols.
Scheme's ancestor, Lisp, was originally developed to aid in experiments in artificial intelligence. At the time, a leading theory suggested that intelligence emphasizes symbolic manipulation. Hence, it is sensible that Lisp and Scheme include symbols as a basic type. Evidence also shows that many programs most appropriately work on abstract symbolic value.
When we want to refer to something as a value
involved in a computation, rather than as the name of some other value, we
put an apostrophe (usually pronounced quote
) in front of it. In
effect, by quoting the symbol, we're telling Scheme to take it literally
and without further interpretation or evaluation:
> 'sample
sample
Note that you can quote many different things. You can even quote Scheme expressions.
> '(+ 2 3)
(+ 2 3)
Although you can use quote in a variety of ways, I prefer that you limit your use to quoting symbolic values.
Wednesday, 4 September 2002
Primary:
[Skip To Body]
[Front Door]
[Current]
[Glance]
[Honesty]
[Instructions]
[Links]
[Search]
[Syllabus]
Groupings:
[Examples]
[Exams]
[Handouts]
[Homework]
[Labs]
[Outlines]
[Readings]
[Reference]
ECA:
[About]
[Grades]
[Quizzes]
[Submit Work]
[Change Password]
[Reset Password]
Miscellaenous:
[Scheme Reference]
[CS151 2002F Gum]
[CS151 2001S]
[SamR]
[Glimmer Labs]
[schemers.org]
Disclaimer:
I usually create these pages on the fly
, which means that I rarely
proofread them and they may contain bad grammar and incorrect details.
It also means that I tend to update them regularly (see the history for
more details). Feel free to contact me with any suggestions for changes.
This document was generated by
Siteweaver on Mon Dec 2 08:42:26 2002.
The source to the document was last modified on Wed Sep 4 08:38:33 2002.
This document may be found at http://www.cs.grinnell.edu/~rebelsky/Courses/CS151/2002F/Readings/symbols.html
.
You may wish to validate this document's HTML ; ; Check with Bobby
Samuel A. Rebelsky, rebelsky@grinnell.edu