blob: b0b0917ea8f654aa7b5eb46960c5467a76949ed2 (
plain) (
tree)
|
|
<HTML>
<HEAD>
<TITLE>Simply Scheme: Introducing Computer Science</TITLE>
</HEAD>
<BODY>
<H1><EM>Simply Scheme: Introducing Computer Science</EM></H1>
<H3>2/e Copyright (C) 1999 MIT</H3>
<H1>Table of Contents</H1>
<TABLE width="100%"><TR><TD>
<IMG SRC="simply.jpg" ALT="cover photo">
<TD><TABLE>
<TR><TD align="right"><CITE><A HREF="http://www.cs.berkeley.edu/~bh/">Brian
Harvey</A><BR>University of California, Berkeley</CITE>
<TR><TD align="right"><CITE><A HREF="http://ccrma.stanford.edu/~matt">Matthew
Wright</A><BR>Stanford University</CITE>
<TR><TD align="right"><BR>
<TR><TD align="right"><A HREF="pdf/ssch00.pdf">Download PDF frontmatter</A>
<TR><TD align="right">[no back]
chapter thread <A HREF="ssch0/foreword.html"><STRONG>NEXT</STRONG></A>
<TR><TD align="right"><A HREF="http://mitpress.mit.edu/0262082810">MIT
Press web page for <CITE>Simply Scheme</CITE></A>
</TABLE></TABLE>
<HR>
<P>Below this short table of contents is an expanded table of contents
including sections within each chapter. Click on the chapter name
to jump down. You can also download the complete text of each chapter
in PDF format for elegant printing, or browse the HTML version.
Part introductions are included in the PDF of the following chapter.
Projects are included in the PDF of the preceding chapter.
<P><EM>Note: This book is still in copyright, and in print. It is
posted here for your personal use, not for resale or redistribution.
Thanks!</EM>
<UL>
<LI><A HREF="ss-toc2.html#foreword">Foreword</A> by
<A HREF="http://groups.csail.mit.edu/mac/users/hal/hal.html">Hal Abelson</A>
(<A HREF="pdf/ssch00.pdf">frontmatter in PDF</A>)
(<A HREF="ssch0/foreword.html">HTML</A>)
<LI><A HREF="ss-toc2.html#preface">Preface</A>
(<A HREF="ssch0/preface.html">HTML</A>)
<LI><A HREF="ss-toc2.html#instructor">To the Instructor</A>
(<A HREF="ssch0/instructor.html">HTML</A>)
<LI><A HREF="ss-toc2.html#ack">Acknowledgements</A>
(<A HREF="ssch0/ack.html">HTML</A>)
<LI>I. <A HREF="ss-toc2.html#part1">Introduction: Functions</A>
(<A HREF="ssch1/part1.html">HTML</A>)
<UL>
<LI>1. <A HREF="ss-toc2.html#showing">Showing Off Scheme</A>
(<A HREF="pdf/ssch01.pdf">PDF</A>)
(<A HREF="ssch1/showing.html">HTML</A>)
<LI>2. <A HREF="ss-toc2.html#functions">Functions</A>
(<A HREF="pdf/ssch02.pdf">PDF</A>)
(<A HREF="ssch2/functions.html">HTML</A>)
</UL>
<LI>II. <A HREF="ss-toc2.html#part2">Composition of Functions</A>
(<A HREF="ssch3/part2.html">HTML</A>)
<UL>
<LI>3. <A HREF="ss-toc2.html#people">Expressions</A>
(<A HREF="pdf/ssch03.pdf">PDF</A>)
(<A HREF="ssch3/people.html">HTML</A>)
<LI>4. <A HREF="ss-toc2.html#defining">Defining Your Own Procedures</A>
(<A HREF="pdf/ssch04.pdf">PDF</A>)
(<A HREF="ssch4/defining.html">HTML</A>)
<LI>5. <A HREF="ss-toc2.html#words">Words and Sentences</A>
(<A HREF="pdf/ssch05.pdf">PDF</A>)
(<A HREF="ssch5/words.html">HTML</A>)
<LI>6. <A HREF="ss-toc2.html#true">True and False</A>
(<A HREF="pdf/ssch06.pdf">PDF</A>)
(<A HREF="ssch6/true.html">HTML</A>)
<LI>7. <A HREF="ss-toc2.html#variables">Variables</A>
(<A HREF="pdf/ssch07.pdf">PDF</A>)
(<A HREF="ssch7/variables.html">HTML</A>)
</UL>
<LI>III. <A HREF="ss-toc2.html#part3">Functions as Data</A>
(<A HREF="ssch8/part3.html">HTML</A>)
<UL>
<LI>8. <A HREF="ss-toc2.html#higher">Higher-Order Functions</A>
(<A HREF="pdf/ssch08.pdf">PDF</A>)
(<A HREF="ssch8/higher.html">HTML</A>)
<LI>9. <A HREF="ss-toc2.html#lambda">Lambda</A>
(<A HREF="pdf/ssch09.pdf">PDF</A>)
(<A HREF="ssch9/lambda.html">HTML</A>)
<LI><A HREF="ss-toc2.html#bridge">Project: Scoring Bridge Hands</A>
(<A HREF="ssch9/bridge.html">HTML</A>)
<LI>10. <A HREF="ss-toc2.html#ttt">Example: Tic-Tac-Toe</A>
(<A HREF="pdf/ssch10.pdf">PDF</A>)
(<A HREF="ssch10/ttt.html">HTML</A>)
</UL>
<LI>IV. <A HREF="ss-toc2.html#part4">Recursion</A>
(<A HREF="ssch11/part4.html">HTML</A>)
<UL>
<LI>11. <A HREF="ss-toc2.html#recursion">Introduction to Recursion</A>
(<A HREF="pdf/ssch11.pdf">PDF</A>)
(<A HREF="ssch11/recursion.html">HTML</A>)
<LI>12. <A HREF="ss-toc2.html#leap">The Leap of Faith</A>
(<A HREF="pdf/ssch12.pdf">PDF</A>)
(<A HREF="ssch12/leap.html">HTML</A>)
<LI>13. <A HREF="ss-toc2.html#convince-recur">How Recursion Works</A>
(<A HREF="pdf/ssch13.pdf">PDF</A>)
(<A HREF="ssch13/convince-recur.html">HTML</A>)
<LI>14. <A HREF="ss-toc2.html#recur-patterns">Common Patterns in Recursive Procedures</A>
(<A HREF="pdf/ssch14.pdf">PDF</A>)
(<A HREF="ssch14/recur-patterns.html">HTML</A>)
<LI><A HREF="ss-toc2.html#number-name">Project: Spelling Names of Huge Numbers</A>
(<A HREF="ssch14/number-name.html">HTML</A>)
<LI>15. <A HREF="ss-toc2.html#adv-recur">Advanced Recursion</A>
(<A HREF="pdf/ssch15.pdf">PDF</A>)
(<A HREF="ssch15/adv-recur.html">HTML</A>)
<LI><A HREF="ss-toc2.html#poker">Project: Scoring Poker Hands</A>
(<A HREF="ssch15/poker.html">HTML</A>)
<LI>16. <A HREF="ss-toc2.html#match">Example: Pattern Matcher</A>
(<A HREF="pdf/ssch16.pdf">PDF</A>)
(<A HREF="ssch16/match.html">HTML</A>)
</UL>
<LI>V. <A HREF="ss-toc2.html#part5">Abstraction</A>
(<A HREF="ssch17/part5.html">HTML</A>)
<UL>
<LI>17. <A HREF="ss-toc2.html#lists">Lists</A>
(<A HREF="pdf/ssch17.pdf">PDF</A>)
(<A HREF="ssch17/lists.html">HTML</A>)
<LI>18. <A HREF="ss-toc2.html#trees">Trees</A>
(<A HREF="pdf/ssch18.pdf">PDF</A>)
(<A HREF="ssch18/trees.html">HTML</A>)
<LI>19. <A HREF="ss-toc2.html#implement-hof">Implementing Higher-Order Functions</A>
(<A HREF="pdf/ssch19.pdf">PDF</A>)
(<A HREF="ssch19/implement-hof.html">HTML</A>)
</UL>
<LI>VI. <A HREF="ss-toc2.html#part6">Sequential Programming</A>
(<A HREF="ssch20/part6.html">HTML</A>)
<UL>
<LI>20. <A HREF="ss-toc2.html#io">Input and Output</A>
(<A HREF="pdf/ssch20.pdf">PDF</A>)
(<A HREF="ssch20/io.html">HTML</A>)
<LI>21. <A HREF="ss-toc2.html#functions-implement">Example: The <CODE>Functions</CODE> Program</A>
(<A HREF="pdf/ssch21.pdf">PDF</A>)
(<A HREF="ssch21/functions-implement.html">HTML</A>)
<LI>22. <A HREF="ss-toc2.html#files">Files</A>
(<A HREF="pdf/ssch22.pdf">PDF</A>)
(<A HREF="ssch22/files.html">HTML</A>)
<LI>23. <A HREF="ss-toc2.html#vectors">Vectors</A>
(<A HREF="pdf/ssch23.pdf">PDF</A>)
(<A HREF="ssch23/vectors.html">HTML</A>)
<LI>24. <A HREF="ss-toc2.html#spread">Example: A Spreadsheet Program</A>
(<A HREF="pdf/ssch24.pdf">PDF</A>)
(<A HREF="ssch24/spread.html">HTML</A>)
<LI>25. <A HREF="ss-toc2.html#spread-implement">Implementing the Spreadsheet Program</A>
(<A HREF="pdf/ssch25.pdf">PDF</A>)
(<A HREF="ssch25/spread-implement.html">HTML</A>)
<LI><A HREF="ss-toc2.html#database">Project: A Database Program</A>
(<A HREF="ssch25/database.html">HTML</A>)
</UL>
<LI>VII. <A HREF="ss-toc2.html#part7">Conclusion: Computer Science</A>
(<A HREF="ssch26/part7.html">HTML</A>)
<UL>
<LI>26. <A HREF="ss-toc2.html#preview">What's Next?</A>
(<A HREF="pdf/ssch26.pdf">PDF</A>)
(<A HREF="ssch26/preview.html">HTML</A>)
</UL>
<LI>Appendices
<UL>
<LI>A. <A HREF="ss-toc2.html#appendix-running">Running Scheme</A>
(<A HREF="pdf/ssch27.pdf">backmatter in PDF</A>)
(<A HREF="ssch27/appendix-running.html">HTML</A>)
<LI>B. <A HREF="ss-toc2.html#appendix-cl">Common Lisp</A>
(<A HREF="ssch27/appendix-cl.html">HTML</A>)
<LI>C. <A HREF="ss-toc2.html#appendix-simply">Scheme Initialization File</A>
(<A HREF="ssch27/appendix-simply.html">HTML</A>)
<LI>D. <A HREF="ss-toc2.html#appendix-gpl">GNU General Public License</A>
(<A HREF="ssch27/appendix-gpl.html">HTML</A>)
</UL>
<LI><A HREF="ss-toc2.html#credits">Credits</A>
(<A HREF="ssch27/credits.html">HTML</A>)
<LI><A HREF="ss-toc2.html#appendix-funlist">Alphabetical Table of Scheme Primitives</A>
(<A HREF="ssch27/appendix-funlist.html">HTML</A>)
<LI><A HREF="ss-toc2.html#glossary">Glossary</A>
(<A HREF="ssch27/glossary.html">HTML</A>)
<LI><A HREF="ss-toc2.html#appuindex">Index of Defined Procedures</A>
(<A HREF="ssch27/appuindex.html">HTML</A>)
<LI><A HREF="ss-toc2.html#appindex">General Index</A>
(<A HREF="ssch27/appindex.html">HTML</A>)
<LI><A HREF="ss-toc2.html#category">Table of Scheme Primitives by Category</A>
(<A HREF="ssch27/category.html">HTML</A>)
</UL>
<P><BR>
<HR>
<P><BR>
<TABLE><TR><TD><H3><A name="foreword">Foreword</A> by
<A HREF="http://groups.csail.mit.edu/mac/users/hal/hal.html">Hal Abelson</A>
</H3><TD>
(<A HREF="pdf/ssch00.pdf">frontmatter in PDF</A>)
(<A HREF="ssch0/foreword.html">HTML</A>)
</TABLE>
<TABLE><TR><TD><H3><A name="preface">Preface</A></H3><TD>
(<A HREF="ssch0/preface.html">HTML</A>)
</TABLE>
<UL>
<LI>One Big Idea: Symbolic Programming
<LI>Lisp and Radical Computer Science
<LI>Who Should Read This Book
<LI>How to Read This Book
</UL>
<TABLE><TR><TD><H3><A name="instructor">To the Instructor</A></H3><TD>
(<A HREF="ssch0/instructor.html">HTML</A>)
</TABLE>
<UL>
<LI>Lists and Sentences
<LI>Sentences and Words
<LI>Overloading in the Text Abstraction
<LI>Higher-Order Procedures, Lambda, and Recursion
<LI>Mutators and Environments
</UL>
<TABLE><TR><TD><H3><A name="ack">Acknowledgements</A></H3><TD>
(<A HREF="ssch0/ack.html">HTML</A>)
</TABLE>
<TABLE><TR><TD><H2>I. <A name="part1">Introduction: Functions</A></H2><TD>
(<A HREF="ssch1/part1.html">HTML</A>)
</TABLE>
<TABLE><TR><TD><H3>1. <A name="showing">Showing Off Scheme</A></H3><TD>
(<A HREF="pdf/ssch01.pdf">PDF</A>)
(<A HREF="ssch1/showing.html">HTML</A>)
</TABLE>
<UL>
<LI>Talking to Scheme
<LI>Recovering from Typing Errors
<LI>Exiting Scheme
<LI>More Examples
<LI>Example: Acronyms
<LI>Example: Pig Latin
<LI>Example: Ice Cream Choices
<LI>Example: Combinations from a Set
<LI>Example: Factorial
<LI>Play with the Procedures
</UL>
<TABLE><TR><TD><H3>2. <A name="functions">Functions</A></H3><TD>
(<A HREF="pdf/ssch02.pdf">PDF</A>)
(<A HREF="ssch2/functions.html">HTML</A>)
</TABLE>
<UL>
<LI>Arithmetic
<LI>Words
<LI>Domain and Range
<LI>More Types: Sentences and Booleans
<LI>Our Favorite Type: Functions
<LI>Play with It
<LI>Thinking about What You've Done
</UL>
<TABLE><TR><TD><H2>II. <A name="part2">Composition of Functions</A></H2><TD>
(<A HREF="ssch3/part2.html">HTML</A>)
</TABLE>
<TABLE><TR><TD><H3>3. <A name="people">Expressions</A></H3><TD>
(<A HREF="pdf/ssch03.pdf">PDF</A>)
(<A HREF="ssch3/people.html">HTML</A>)
</TABLE>
<UL>
<LI>Little People
<LI>Result Replacement
<LI>Plumbing Diagrams
<LI>Pitfalls
</UL>
<TABLE><TR><TD><H3>4. <A name="defining">Defining Your Own Procedures</A></H3><TD>
(<A HREF="pdf/ssch04.pdf">PDF</A>)
(<A HREF="ssch4/defining.html">HTML</A>)
</TABLE>
<UL>
<LI>How to Define a Procedure
<LI>Special Forms
<LI>Functions and Procedures
<LI>Argument Names versus Argument Values
<LI>Procedure as Generalization
<LI>Composability
<LI>The Substitution Model
<LI>Pitfalls
</UL>
<TABLE><TR><TD><H3>5. <A name="words">Words and Sentences</A></H3><TD>
(<A HREF="pdf/ssch05.pdf">PDF</A>)
(<A HREF="ssch5/words.html">HTML</A>)
</TABLE>
<UL>
<LI>Selectors
<LI>Constructors
<LI>First-Class Words and Sentences
<LI>Pitfalls
</UL>
<TABLE><TR><TD><H3>6. <A name="true">True and False</A></H3><TD>
(<A HREF="pdf/ssch06.pdf">PDF</A>)
(<A HREF="ssch6/true.html">HTML</A>)
</TABLE>
<UL>
<LI>Predicates
<LI>Using Predicates
<LI><CODE>If</CODE> Is a Special Form
<LI>So Are <CODE>And</CODE> and <CODE>Or</CODE>
<LI>Everything That Isn't False Is True
<LI>Decisions, Decisions, Decisions
<LI><CODE>If</CODE> Is Composable
<LI>Pitfalls
</UL>
<TABLE><TR><TD><H3>7. <A name="variables">Variables</A></H3><TD>
(<A HREF="pdf/ssch07.pdf">PDF</A>)
(<A HREF="ssch7/variables.html">HTML</A>)
</TABLE>
<UL>
<LI>How Little People Do Variables
<LI>Global and Local Variables
<LI>The Truth about Substitution
<LI><CODE>Let</CODE>
<LI>Pitfalls
</UL>
<TABLE><TR><TD><H2>III. <A name="part3">Functions as Data</A></H2><TD>
(<A HREF="ssch8/part3.html">HTML</A>)
</TABLE>
<TABLE><TR><TD><H3>8. <A name="higher">Higher-Order Functions</A></H3><TD>
(<A HREF="pdf/ssch08.pdf">PDF</A>)
(<A HREF="ssch8/higher.html">HTML</A>)
</TABLE>
<UL>
<LI><CODE>Every</CODE>
<LI>A Pause for Reflection
<LI><CODE>Keep</CODE>
<LI><CODE>Accumulate</CODE>
<LI>Combining Higher-Order Functions
<LI>Choosing the Right Tool
<LI>First-Class Functions and First-Class Sentences
<LI><CODE>Repeated</CODE>
<LI>Pitfalls
</UL>
<TABLE><TR><TD><H3>9. <A name="lambda">Lambda</A></H3><TD>
(<A HREF="pdf/ssch09.pdf">PDF</A>)
(<A HREF="ssch9/lambda.html">HTML</A>)
</TABLE>
<UL>
<LI>Procedures That Return Procedures
<LI>The Truth about <CODE>Define</CODE>
<LI>The Truth about <CODE>Let</CODE>
<LI>Name Conflicts
<LI>Named and Unnamed Functions
<LI>Pitfalls
</UL>
<TABLE><TR><TD><H3><A name="bridge">Project: Scoring Bridge Hands</A></H3><TD>
(<A HREF="ssch9/bridge.html">HTML</A>)
</TABLE>
<TABLE><TR><TD><H3>10. <A name="ttt">Example: Tic-Tac-Toe</A></H3><TD>
(<A HREF="pdf/ssch10.pdf">PDF</A>)
(<A HREF="ssch10/ttt.html">HTML</A>)
</TABLE>
<UL>
<LI>A Warning
<LI>Technical Terms in Tic-Tac-Toe
<LI>Thinking about the Program Structure
<LI>The First Step: Triples
<LI>Finding the Triples
<LI>Using <CODE>Every</CODE> with Two-Argument Procedures
<LI>Can the Computer Win on This Move?
<LI>If So, in Which Square?
<LI>Second Verse, Same as the First
<LI>Now the Strategy Gets Complicated
<LI>Finding the Pivots
<LI>Taking the Offensive
<LI>Leftovers
<LI>Complete Program Listing
</UL>
<TABLE><TR><TD><H2>IV. <A name="part4">Recursion</A></H2><TD>
(<A HREF="ssch11/part4.html">HTML</A>)
</TABLE>
<TABLE><TR><TD><H3>11. <A name="recursion">Introduction to Recursion</A></H3><TD>
(<A HREF="pdf/ssch11.pdf">PDF</A>)
(<A HREF="ssch11/recursion.html">HTML</A>)
</TABLE>
<UL>
<LI>A Separate Procedure for Each Length
<LI>Use What You Have to Get What You Need
<LI>Notice That They're All the Same
<LI>Notice That They're Almost All the Same
<LI>Base Cases and Recursive Calls
<LI>Pig Latin
<LI>Problems for You to Try
<LI>Our Solutions
<LI>Pitfalls
</UL>
<TABLE><TR><TD><H3>12. <A name="leap">The Leap of Faith</A></H3><TD>
(<A HREF="pdf/ssch12.pdf">PDF</A>)
(<A HREF="ssch12/leap.html">HTML</A>)
</TABLE>
<UL>
<LI>From the Combining Method to the Leap of Faith
<LI>Example: <CODE>Reverse</CODE>
<LI>The Leap of Faith
<LI>The Base Case
<LI>Example: <CODE>Factorial</CODE>
<LI>Likely Guesses for Smaller Subproblems
<LI>Example: <CODE>Downup</CODE>
<LI>Example: <CODE>Evens</CODE>
<LI>Simplifying Base Cases
<LI>Pitfalls
</UL>
<TABLE><TR><TD><H3>13. <A name="convince-recur">How Recursion Works</A></H3><TD>
(<A HREF="pdf/ssch13.pdf">PDF</A>)
(<A HREF="ssch13/convince-recur.html">HTML</A>)
</TABLE>
<UL>
<LI>Little People and Recursion
<LI>Tracing
<LI>Pitfalls
</UL>
<TABLE><TR><TD><H3>14. <A name="recur-patterns">Common Patterns in Recursive Procedures</A></H3><TD>
(<A HREF="pdf/ssch14.pdf">PDF</A>)
(<A HREF="ssch14/recur-patterns.html">HTML</A>)
</TABLE>
<UL>
<LI>The <CODE>Every</CODE> Pattern
<LI>The <CODE>Keep</CODE> Pattern
<LI>The <CODE>Accumulate</CODE> Pattern
<LI>Combining Patterns
<LI>Helper Procedures
<LI>How to Use Recursive Patterns
<LI>Problems That Don't Follow Patterns
<LI>Pitfalls
</UL>
<TABLE><TR><TD><H3><A name="number-name">Project: Spelling Names of Huge Numbers</A></H3><TD>
(<A HREF="ssch14/number-name.html">HTML</A>)
</TABLE>
<TABLE><TR><TD><H3>15. <A name="adv-recur">Advanced Recursion</A></H3><TD>
(<A HREF="pdf/ssch15.pdf">PDF</A>)
(<A HREF="ssch15/adv-recur.html">HTML</A>)
</TABLE>
<UL>
<LI>Example: <CODE>Sort</CODE>
<LI>Example: <CODE>From-Binary</CODE>
<LI>Example: <CODE>Mergesort</CODE>
<LI>Example: <CODE>Subsets</CODE>
<LI>Pitfalls
</UL>
<TABLE><TR><TD><H3><A name="poker">Project: Scoring Poker Hands</A></H3><TD>
(<A HREF="ssch15/poker.html">HTML</A>)
</TABLE>
<UL>
<LI>Extra Work for Hotshots
</UL>
<TABLE><TR><TD><H3>16. <A name="match">Example: Pattern Matcher</A></H3><TD>
(<A HREF="pdf/ssch16.pdf">PDF</A>)
(<A HREF="ssch16/match.html">HTML</A>)
</TABLE>
<UL>
<LI>Problem Description
<LI>Implementation: When Are Two Sentences Equal?
<LI>When Are Two Sentences Nearly Equal?
<LI>Matching with Alternatives
<LI>Backtracking
<LI>Matching Several Words
<LI>Combining the Placeholders
<LI>Naming the Matched Text
<LI>The Final Version
<LI>Abstract Data Types
<LI>Backtracking and <CODE>Known-Values</CODE>
<LI>How We Wrote It
<LI>Complete Program Listing
</UL>
<TABLE><TR><TD><H2>V. <A name="part5">Abstraction</A></H2><TD>
(<A HREF="ssch17/part5.html">HTML</A>)
</TABLE>
<TABLE><TR><TD><H3>17. <A name="lists">Lists</A></H3><TD>
(<A HREF="pdf/ssch17.pdf">PDF</A>)
(<A HREF="ssch17/lists.html">HTML</A>)
</TABLE>
<UL>
<LI>Selectors and Constructors
<LI>Programming with Lists
<LI>The Truth about Sentences
<LI>Higher-Order Functions
<LI>Other Primitives for Lists
<LI>Association Lists
<LI>Functions That Take Variable Numbers of Arguments
<LI>Recursion on Arbitrary Structured Lists
<LI>Pitfalls
</UL>
<TABLE><TR><TD><H3>18. <A name="trees">Trees</A></H3><TD>
(<A HREF="pdf/ssch18.pdf">PDF</A>)
(<A HREF="ssch18/trees.html">HTML</A>)
</TABLE>
<UL>
<LI>Example: The World
<LI>How Big Is My Tree?
<LI>Mutual Recursion
<LI>Searching for a Datum in the Tree
<LI>Locating a Datum in the Tree
<LI>Representing Trees as Lists
<LI>Abstract Data Types
<LI>An Advanced Example: Parsing Arithmetic Expressions
<LI>Pitfalls
</UL>
<TABLE><TR><TD><H3>19. <A name="implement-hof">Implementing Higher-Order Functions</A></H3><TD>
(<A HREF="pdf/ssch19.pdf">PDF</A>)
(<A HREF="ssch19/implement-hof.html">HTML</A>)
</TABLE>
<UL>
<LI>Generalizing Patterns
<LI>The <CODE>Every</CODE> Pattern Revisited
<LI>The Difference between <CODE>Map</CODE> and <CODE>Every</CODE>
<LI><CODE>Filter</CODE>
<LI><CODE>Accumulate</CODE> and <CODE>Reduce</CODE>
<LI>Robustness
<LI>Higher-Order Functions for Structured Lists
<LI>The Zero-Trip Do Loop
<LI>Pitfalls
</UL>
<TABLE><TR><TD><H2>VI. <A name="part6">Sequential Programming</A></H2><TD>
(<A HREF="ssch20/part6.html">HTML</A>)
</TABLE>
<TABLE><TR><TD><H3>20. <A name="io">Input and Output</A></H3><TD>
(<A HREF="pdf/ssch20.pdf">PDF</A>)
(<A HREF="ssch20/io.html">HTML</A>)
</TABLE>
<UL>
<LI>Printing
<LI>Side Effects and Sequencing
<LI>The <CODE>Begin</CODE> Special Form
<LI>This Isn't Functional Programming
<LI>Not Moving to the Next Line
<LI>Strings
<LI>A Higher-Order Procedure for Sequencing
<LI>Tic-Tac-Toe Revisited
<LI>Accepting User Input
<LI>Aesthetic Board Display
<LI>Reading and Writing Normal Text
<LI>Formatted Text
<LI>Sequential Programming and Order of Evaluation
<LI>Pitfalls
</UL>
<TABLE><TR><TD><H3>21. <A name="functions-implement">Example: The <CODE>Functions</CODE> Program</A></H3><TD>
(<A HREF="pdf/ssch21.pdf">PDF</A>)
(<A HREF="ssch21/functions-implement.html">HTML</A>)
</TABLE>
<UL>
<LI>The Main Loop
<LI>The Difference between a Procedure and Its Name
<LI>The Association List of Functions
<LI>Domain Checking
<LI>Intentionally Confusing a Function with Its Name
<LI>More on Higher-Order Functions
<LI>More Robustness
<LI>Complete Program Listing
</UL>
<TABLE><TR><TD><H3>22. <A name="files">Files</A></H3><TD>
(<A HREF="pdf/ssch22.pdf">PDF</A>)
(<A HREF="ssch22/files.html">HTML</A>)
</TABLE>
<UL>
<LI>Ports
<LI>Writing Files for People to Read
<LI>Using a File as a Database
<LI>Transforming the Lines of a File
<LI>Justifying Text
<LI>Preserving Spacing of Text from Files
<LI>Merging Two Files
<LI>Writing Files for Scheme to Read
<LI>Pitfalls
</UL>
<TABLE><TR><TD><H3>23. <A name="vectors">Vectors</A></H3><TD>
(<A HREF="pdf/ssch23.pdf">PDF</A>)
(<A HREF="ssch23/vectors.html">HTML</A>)
</TABLE>
<UL>
<LI>The Indy 500
<LI>Vectors
<LI>Using Vectors in Programs
<LI>Non-Functional Procedures and State
<LI>Shuffling a Deck
<LI>More Vector Tools
<LI>The Vector Pattern of Recursion
<LI>Vectors versus Lists
<LI>State, Sequence, and Effects
<LI>Pitfalls
</UL>
<TABLE><TR><TD><H3>24. <A name="spread">Example: A Spreadsheet Program</A></H3><TD>
(<A HREF="pdf/ssch24.pdf">PDF</A>)
(<A HREF="ssch24/spread.html">HTML</A>)
</TABLE>
<UL>
<LI>Limitations of Our Spreadsheet
<LI>Spreadsheet Commands
<LI>Moving the Selection
<LI>Putting Values in Cells
<LI>Formulas
<LI>Displaying Formula Values
<LI>Loading Spreadsheet Commands from a File
<LI>Application Programs and Abstraction
</UL>
<TABLE><TR><TD><H3>25. <A name="spread-implement">Implementing the Spreadsheet Program</A></H3><TD>
(<A HREF="pdf/ssch25.pdf">PDF</A>)
(<A HREF="ssch25/spread-implement.html">HTML</A>)
</TABLE>
<UL>
<LI>Cells, Cell Names, and Cell IDs
<LI>The Command Processor
<LI>Cell Selection Commands
<LI>The <CODE>Load</CODE> Command
<LI>The <CODE>Put</CODE> Command
<LI>The Formula Translator
<LI>The Dependency Manager
<LI>The Expression Evaluator
<LI>The Screen Printer
<LI>The Cell Manager
<LI>Complete Program Listing
</UL>
<TABLE><TR><TD><H3><A name="database">Project: A Database Program</A></H3><TD>
(<A HREF="ssch25/database.html">HTML</A>)
</TABLE>
<UL>
<LI>A Sample Session with Our Database
<LI>How Databases Are Stored Internally
<LI>The Current Database
<LI>Implementing the Database Program Commands
<LI>Additions to the Program
<LI>Extra Work for Hotshots
</UL>
<TABLE><TR><TD><H2>VII. <A name="part7">Conclusion: Computer Science</A></H2><TD>
(<A HREF="ssch26/part7.html">HTML</A>)
</TABLE>
<TABLE><TR><TD><H3>26. <A name="preview">What's Next?</A></H3><TD>
(<A HREF="pdf/ssch26.pdf">PDF</A>)
(<A HREF="ssch26/preview.html">HTML</A>)
</TABLE>
<UL>
<LI>The Best Computer Science Book
<LI>Beyond <EM>SICP</EM>
<LI>Standard Scheme
<LI>Last Words
</UL>
<H2>Appendices</H2>
</TABLE>
<TABLE><TR><TD><H3>A. <A name="appendix-running">Running Scheme</A></H3><TD>
(<A HREF="pdf/ssch27.pdf">backmatter in PDF</A>)
(<A HREF="ssch27/appendix-running.html">HTML</A>)
</TABLE>
<UL>
<LI>The Program Development Cycle
<LI>Integrated Editing
<LI>Getting Our Programs
<LI>Tuning Our Programs for Your System
<LI>Loading Our Programs
<LI>Versions of Scheme
<LI>Scheme Standards
</UL>
<TABLE><TR><TD><H3>B. <A name="appendix-cl">Common Lisp</A></H3><TD>
(<A HREF="ssch27/appendix-cl.html">HTML</A>)
</TABLE>
<UL>
<LI>Why Common Lisp Exists
<LI>Defining Procedures and Variables
<LI>The Naming Convention for Predicates
<LI>No Words or Sentences
<LI>True and False
<LI>Files
<LI>Arrays
<LI>Equivalents to Scheme Primitives
<LI>A Separate Name Space for Procedures
<LI><CODE>Lambda</CODE>
<LI>More about <CODE>Function</CODE>
<LI>Writing Higher-Order Procedures
</UL>
<TABLE><TR><TD><H3>C. <A name="appendix-simply">Scheme Initialization File</A></H3><TD>
(<A HREF="ssch27/appendix-simply.html">HTML</A>)
</TABLE>
<TABLE><TR><TD><H3>D. <A name="appendix-gpl">GNU General Public License</A></H3><TD>
(<A HREF="ssch27/appendix-gpl.html">HTML</A>)
</TABLE>
<TABLE><TR><TD><H3><A name="credits">Credits</A></H3><TD>
(<A HREF="ssch27/credits.html">HTML</A>)
</TABLE>
<TABLE><TR><TD><H3><A name="appendix-funlist">Alphabetical Table of Scheme Primitives</A></H3><TD>
(<A HREF="ssch27/appendix-funlist.html">HTML</A>)
</TABLE>
<TABLE><TR><TD><H3><A name="glossary">Glossary</A></H3><TD>
(<A HREF="ssch27/glossary.html">HTML</A>)
</TABLE>
<TABLE><TR><TD><H3><A name="appuindex">Index of Defined Procedures</A></H3><TD>
(<A HREF="ssch27/appuindex.html">HTML</A>)
</TABLE>
<TABLE><TR><TD><H3><A name="appindex">General Index</A></H3><TD>
(<A HREF="ssch27/appindex.html">HTML</A>)
</TABLE>
<TABLE><TR><TD><H3><A name="category">Table of Scheme Primitives by Category</A></H3><TD>
(<A HREF="ssch27/category.html">HTML</A>)
</TABLE>
<P><BR>
<HR>
<P><BR>
<P>
[no back]
chapter thread <A HREF="ssch0/foreword.html"><STRONG>NEXT</STRONG></A>
<P>
<ADDRESS>
<A HREF="index.html">Brian Harvey</A>,
<CODE>bh@cs.berkeley.edu</CODE>
</ADDRESS>
</BODY>
</HTML>
|