<HTML>
<HEAD>
<TITLE>Simply Scheme part I introduction</TITLE>
</HEAD>
<BODY>
<CITE>Simply Scheme</CITE> 2/e Copyright (C) 1999 MIT
<H1>Introduction: Functions</H1>
<TABLE><TR><TD>
<P><IMG SRC="simply.jpg" ALT="cover photo">
<TD valign="center">
<CITE><A HREF="http://www.cs.berkeley.edu/~bh/">Brian
Harvey</A><BR><A HREF="http://www.cnmat.berkeley.edu/~matt">Matthew
Wright</A><BR>University of California, Berkeley</CITE>
<BR><BR><A HREF="http://www-mitpress.mit.edu/book-home.tcl?isbn=0262082810">MIT
Press web page for Simply Scheme</A>
</TABLE>
<P><A HREF="simply-toc.html">(back to Table of Contents)</A>
<HR>
<P>The purpose of these introductory pages before each part of the book is to
call attention to a big idea that runs through all the work of several
chapters. In the chapters themselves, the big idea may sometimes be hidden
from view because of the technical details that we need to make the idea
work. If you ever feel lost in the forest, you might want to refer back
here.
<P>In these first two chapters, our goal is to introduce the Scheme programming
language and the idea of using <EM>functions</EM> as the building blocks of a
computation.
<P>The first chapter is a collection of short Scheme programs, presented to
show off what Scheme can do. We'll try to explain enough of the mechanism
so that you don't feel completely mystified, but we'll defer the
details until later. Our goal is not for you to feel that you could
re-create these programs, but rather that you get a sense of what
<EM>kinds</EM> of programs we'll be working with.
<P>The second chapter explores functions in some detail. Traditionally,
computer programs are built out of <EM>actions:</EM> First do this, then do
that, and finally print the results. Each step in the program <EM>does</EM>
something. Functional programming is different, in that we are less
concerned with actions and more concerned with values.
<P>For example, if you have a pocket calculator with a square root button, you
could enter the number 3, push the button, and you'll see something like
1.732050808 in the display. How does the calculator know? There are
several possible processes that the calculator could carry out. One
process, for example, is to make a guess, square it, see if the result is
too big or too small, and use that information to make a closer guess.
That's a sequence of actions. But ordinarily you don't care what actions
the calculator takes; what interests you is that you want to apply the
square root <EM>function</EM> to the <EM>argument</EM> 3, and get back a
<EM>value.</EM> We're going to focus on this business of functions, arguments,
and result values.
<P>Don't think that functions have to involve numbers. We'll be working with
functions like "first name," "plural," and "acronym." These functions
have words and sentences as their arguments and values.
<P><A HREF="simply-toc.html">(back to Table of Contents)</A>
</pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { color: #888888 } /* Comment.Multiline */
.highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
.highlight .c1 { color: #888888 } /* Comment.Single */
.highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #333333 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #666666 } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #008800 } /* Keyword.Pseudo */
.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */
.highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */
.highlight .na { color: #336699 } /* Name.Attribute */
.highlight .nb { color: #003388 } /* Name.Builtin */
.highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */
.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */
.highlight .nd { color: #555555 } /* Name.Decorator */
.highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */
.highlight .nl { color: #336699; font-style: italic } /* Name.Label */
.highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */
.highlight .py { color: #336699; font-weight: bold } /* Name.Property */
.highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #336699 } /* Name.Variable */
.highlight .ow { color: #008800 } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */
.highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */
.highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */
.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */
.highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */
.highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */
.highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */
.highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */
.highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */
.highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */
.highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */
.highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */
.highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */
.highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */
.highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */
.highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */
.highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */
.highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */
.highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */
.highlight .vc { color: #336699 } /* Name.Variable.Class */
.highlight .vg { color: #dd7700 } /* Name.Variable.Global */
.highlight .vi { color: #3333bb } /* Name.Variable.Instance */
.highlight .vm { color: #336699 } /* Name.Variable.Magic */
.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */<HTML>
<HEAD>
<TITLE>Symbolic Computing contents</TITLE>
<link rel="shortcut icon" href="http://www.cs.berkeley.edu/~bh/csls1-tiny.png" type="image/png">
</HEAD>
<BODY>
<CITE>Computer Science Logo Style</CITE> volume 1:
<CITE>Symbolic Computing</CITE> 2/e Copyright (C) 1997 MIT
<H1><EM>Computer Science Logo Style</EM><BR>
Volume 1: <EM>Symbolic Computing</EM></H1>
<CITE>Brian Harvey<BR>University of California, Berkeley</CITE>
<P><TABLE width="100%"><TR>
<TD><IMG SRC="csls1.jpg">
<TD><TABLE>
<TR><TD align="right"><A HREF="v2-toc2.html">Volume 2: <CITE>Advanced Techniques</CITE></A>
<IMG SRC="csls2-tiny.jpg">
<TR><TD align="right"><A HREF="v3-toc2.html">Volume 3: <CITE>Beyond Programming</CITE></A>
<IMG SRC="csls3-tiny.jpg">
<TR><TD align="right"><A HREF="logo.html">Download Berkeley Logo (UCBLogo)</A>
<IMG SRC="ucblogo2-tiny.gif">
<TR><TD align="right"><A HREF="index.html">Brian's home page</A>
<IMG SRC="bh-tiny.jpg">
<TR><TD align="right"> <A HREF="https://mitpress.mit.edu/books/computer-science-logo-style-second-edition-volume-1">MIT
Press web page for <CITE>Computer Science Logo Style</CITE></A>
<IMG SRC="mitp.jpg">
</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.
<P><EM>Note: These books are still in copyright, and in print. They are
posted here for your personal use, not for resale or redistribution.
Thanks!</EM>
<p>I don't know why suddenly everyone wants to translate this page to other
languages, but here they are. It's just this page, not the whole book.
<p>
<a href="http://www.azoft.com/people/seremina/edu/v1-toc2-romanian.html">View
this
page in Romanian</a> courtesy of <a href="http://www.azoft.com/">azoft</a>.
<br><a href="http://cupegraf.com/blog/toc2/">Slovakian translation</a> courtesy
of <a href="http://cupegraf.com">Gasper Halipovich</a>.
<br><a href="*http://translate.coupofy.com/computer-science-logo-style/
<http://translate.coupofy.com/computer-science-logo-style/>*">Vietnamese
translation</a> courtesy of Julia Duong from <a href="http:/www.coupofy.com/
">coupofy.com</a>.<br>
<a href="http://search-sos.org/computer-science-logo-style-volume-1/">Russian
Translation</a> Courtesy of <a href="http://search-sos.org/">Search-Sos</a>.
<UL>
<LI>Preface
(<A HREF="pdf/v1ch00.pdf">frontmatter in PDF</A>)
(<A HREF="v1ch0/preface.html">HTML</A>)
<LI>Acknowledgements
(<A HREF="v1ch0/ack.html">HTML</A>)
<LI>1. <A HREF="v1-toc2.html#ch1">Exploration</A>
(<A HREF="pdf/v1ch01.pdf">PDF</A>)
(<A HREF="v1ch1/explor.html">HTML</A>)
<LI>2. <A HREF="v1-toc2.html#ch2">Procedures</A>
(<A HREF="pdf/v1ch02.pdf">PDF</A>)
(<A HREF="v1ch2/proced.html">HTML</A>)
<LI>3. <A HREF="v1-toc2.html#ch3">Variables</A>
(<A HREF="pdf/v1ch03.pdf">PDF</A>)
(<A HREF="v1ch3/variab.html">HTML</A>)
<LI>4. <A HREF="v1-toc2.html#ch4">Predicates</A>
(<A HREF="pdf/v1ch04.pdf">PDF</A>)
(<A HREF="v1ch4/predic.html">HTML</A>)
<LI>5. <A HREF="v1-toc2.html#ch5">Functions of Functions</A>
(<A HREF="pdf/v1ch05.pdf">PDF</A>)
(<A HREF="v1ch5/hof.html">HTML</A>)
<LI>6. <A HREF="v1-toc2.html#ch6">Example: Tic-Tac-Toe</A>
(<A HREF="pdf/v1ch06.pdf">PDF</A>)
(<A HREF="v1ch6/ttt.html">HTML</A>)
<LI>7. <A HREF="v1-toc2.html#ch7">Introduction to Recursion</A>
(<A HREF="pdf/v1ch07.pdf">PDF</A>)
(<A HREF="v1ch7/recur1.html">HTML</A>)
<LI>8. <A HREF="v1-toc2.html#ch8">Practical Recursion: the Leap of Faith</A>
(<A HREF="pdf/v1ch08.pdf">PDF</A>)
(<A HREF="v1ch8/recur2.html">HTML</A>)
<LI>9. <A HREF="v1-toc2.html#ch9">How Recursion Works</A>
(<A HREF="pdf/v1ch09.pdf">PDF</A>)
(<A HREF="v1ch9/recur3.html">HTML</A>)
<LI>10. <A HREF="v1-toc2.html#ch10">Turtle Geometry</A>
(<A HREF="pdf/v1ch10.pdf">PDF</A>)
(<A HREF="v1ch10/turtle.html">HTML</A>)
<LI>11. <A HREF="v1-toc2.html#ch11">Recursive Operations</A>
(<A HREF="pdf/v1ch11.pdf">PDF</A>)
(<A HREF="v1ch11/recops.html">HTML</A>)
<LI>12. <A HREF="v1-toc2.html#ch12">Example: Playfair Cipher</A>
(<A HREF="pdf/v1ch12.pdf">PDF</A>)
(<A HREF="v1ch12/playfair.html">HTML</A>)
<LI>13. <A HREF="v1-toc2.html#ch13">Planning</A>
(<A HREF="pdf/v1ch13.pdf">PDF</A>)
(<A HREF="v1ch13/plan.html">HTML</A>)
<LI>14. <A HREF="v1-toc2.html#ch14">Example: Pitcher Problem Solver</A>
(<A HREF="pdf/v1ch14.pdf">PDF</A>)
(<A HREF="v1ch14/pour.html">HTML</A>)
<LI>15. <A HREF="v1-toc2.html#ch15">Debugging</A>
(<A HREF="pdf/v1ch15.pdf">PDF</A>)
(<A HREF="v1ch15/debug.html">HTML</A>)
<LI>A. Running Berkeley Logo
(<A HREF="pdf/v1ch16.pdf">backmatter in PDF</A>)
(<A HREF="v1ch16/versions.html">HTML</A>)
<LI>B. GNU General Public License
(<A HREF="v1ch16/appendix-gpl.html">HTML</A>)
<LI>Index of Defined Procedures
(<A HREF="v1ch16/appuindex.html">HTML</A>)
<LI>General Index
(<A HREF="v1ch16/appindex.html">HTML</A>)
</UL>
<HR>
<TABLE><TR><TD><H3>Preface</H3><TD>
(<A HREF="pdf/v1ch00.pdf">frontmatter in PDF</A>)
(<A HREF="v1ch0/preface.html">HTML</A>)
</TABLE>
<UL>
<LI>The Intellectual Content of Computer Programming
<LI>Computer Science Apprenticeship
<LI>About the Second Edition
<LI>Why Logo?
<LI>Hardware and Software Requirements
<LI>Words of Wisdom
</UL>
<TABLE><TR><TD><H3>Acknowledgements</H3><TD>
(<A HREF="v1ch0/ack.html">HTML</A>)
</TABLE>
<TABLE><TR><TD><H3><A name="ch1">1. Exploration</A></H3><TD>
(<A HREF="pdf/v1ch01.pdf">PDF</A>)
(<A HREF="v1ch1/explor.html">HTML</A>)
</TABLE>
<UL>
<LI>Getting Acquainted with Logo...
<LI>... in Two Senses
<LI>Another Greeting
<LI>Fooling Around
<LI>A Slightly Longer Conversation
<LI>A Sneaky Greeting
<LI>A Quiz Program
<LI>Saving Your Work
<LI>About Chapter 2
<LI>No Exercises
</UL>
<TABLE><TR><TD><H3><A name="ch2">2. Procedures</A></H3><TD>
(<A HREF="pdf/v1ch02.pdf">PDF</A>)
(<A HREF="v1ch2/proced.html">HTML</A>)
</TABLE>
<UL>
<LI>Procedures and Instructions
<LI>Technical Terms
<LI>Evaluation
<LI>Error Messages
<LI>Commands and Operations
<LI>Words and Lists
<LI>How to Describe a Procedure
<LI>Manipulating Words and Lists
<LI><CODE>Print</CODE> and <CODE>Show</CODE>
<LI>Order of Evaluation
<LI>Special Forms of Evaluation
<LI>Writing Your Own Procedures
<LI>Editing Your Procedures
<LI>Syntax and Semantics
<LI>Parentheses and Plumbing Diagrams
<LI>Nonsense Plumbing Diagrams
</UL>
<TABLE><TR><TD><H3><A name="ch3">3. Variables</A></H3><TD>
(<A HREF="pdf/v1ch03.pdf">PDF</A>)
(<A HREF="v1ch3/variab.html">HTML</A>)
</TABLE>
<UL>
<LI>User Procedures With Inputs
<LI>What Kind of Container?
<LI>An Abbreviation
<LI>More Procedures
<LI>An Aside on Variable Naming
<LI>Don't Call It <CODE>X</CODE>
<LI>Writing New Operations
<LI>Scope of Variables
<LI>The Little Person Metaphor
<LI>Changing the Value of a Variable
<LI>Global and Local Variables
<LI>Indirect Assignment
<LI>Functional Programming
</UL>
<TABLE><TR><TD><H3><A name="ch4">4. Predicates</A></H3><TD>
(<A HREF="pdf/v1ch04.pdf">PDF</A>)
(<A HREF="v1ch4/predic.html">HTML</A>)
</TABLE>
<UL>
<LI>True or False
<LI>Defining Your Own Predicates
<LI>Conditional Evaluation
<LI>Choosing Between Alternatives
<LI>Conditional Evaluation Another Way
<LI>About Those Brackets
<LI>Logical Connectives
<LI><CODE>Ifelse</CODE> as an Operation
<LI>Expression Lists and Plumbing Diagrams
<LI>Stopping a Procedure
<LI>Improving the Quiz Program
<LI>Reporting Success to a Superprocedure
</UL>
<TABLE><TR><TD><H3><A name="ch5">5. Functions of Functions</A></H3><TD>
(<A HREF="pdf/v1ch05.pdf">PDF</A>)
(<A HREF="v1ch5/hof.html">HTML</A>)
</TABLE>
<UL>
<LI>The Problem: <CODE>Initials</CODE>
<LI>One Solution: Numeric Iteration
<LI>Critique of Numeric Iteration
<LI>What's a Function?
<LI>Functions of Functions: <CODE>Map</CODE>
<LI>Higher Order Selection: <CODE>Filter</CODE>
<LI>Many to One: <CODE>Reduce</Code>
<LI>Choosing the Right Tool
<LI>Anonymous Functions
<LI>Higher Order Miscellany
<LI>Repeated Invocation: <CODE>Cascade</CODE>
<LI>A Mini-Project: Mastermind
</UL>
<TABLE><TR><TD><H3><A name="ch6">6. Example: Tic-Tac-Toe</A></H3><TD>
(<A HREF="pdf/v1ch06.pdf">PDF</A>)
(<A HREF="v1ch6/ttt.html">HTML</A>)
</TABLE>
<P>
<I>This program plays the game of Tic Tac Toe against the user. It follows a
perfect strategy, so it always wins or ties.</I>
<UL>
<LI>The Project
<LI>Strategy
<LI>Program Structure and Modularity
<LI>Data Representation
<LI>Arrays
<LI>Triples
<LI>Variables in the Workspace
<LI>The User Interface
<LI>Implementing the Strategy Rules
<LI>Further Explorations
<LI>Program Listing
</UL>
<TABLE><TR><TD><H3><A name="ch7">7. Introduction to Recursion</A></H3><TD>
(<A HREF="pdf/v1ch07.pdf">PDF</A>)
(<A HREF="v1ch7/recur1.html">HTML</A>)
</TABLE>
<UL>
<LI>Starting Small
<LI>Building Up
<LI>Generalizing the Pattern
<LI>What Went Wrong?
<LI>The Stop Rule
<LI>Local Variables
<LI>More Examples
<LI>Other Stop Rules
</UL>
<TABLE><TR><TD><H3><A name="ch8">8. Practical Recursion: the Leap of Faith</A></H3><TD>
(<A HREF="pdf/v1ch08.pdf">PDF</A>)
(<A HREF="v1ch8/recur2.html">HTML</A>)
</TABLE>
<UL>
<LI>Recursive Patterns
<LI>The Leap of Faith
<LI>The Tower of Hanoi
<LI>More Complicated Patterns
<LI>A Mini-Project: Scrambled Sentences
<LI>Procedure Patterns
<LI>Tricky Stop Rules
</UL>
<TABLE><TR><TD><H3><A name="ch9">9. How Recursion Works</A></H3><TD>
(<A HREF="pdf/v1ch09.pdf">PDF</A>)
(<A HREF="v1ch9/recur3.html">HTML</A>)
</TABLE>
<UL>
<LI>Little People and Recursion
<LI>Tracing
<LI>Level and Sequence
<LI>Instruction Stepping
</UL>
<TABLE><TR><TD><H3><A name="ch10">10. Turtle Geometry</A></H3><TD>
(<A HREF="pdf/v1ch10.pdf">PDF</A>)
(<A HREF="v1ch10/turtle.html">HTML</A>)
</TABLE>
<UL>
<LI>A Review, or a Brief Introduction
<LI>Local vs. Global Descriptions
<LI>The Turtle's State
<LI>Symmetry
<LI>Fractals
<LI>Further Reading
</UL>
<TABLE><TR><TD><H3><A name="ch11">11. Recursive Operations</A></H3><TD>
(<A HREF="pdf/v1ch11.pdf">PDF</A>)
(<A HREF="v1ch11/recops.html">HTML</A>)
</TABLE>
<UL>
<LI>A Simple Substitution Cipher
<LI>More Procedure Patterns
<LI>The <CODE>Filter</CODE> Pattern
<LI>The <CODE>Reduce</CODE> Pattern
<LI>The <CODE>Find</CODE> Pattern
<LI>Numerical Operations: the <CODE>Cascade</CODE> Pattern
<LI>Pig Latin
<LI>A Mini-Project: Spelling Numbers
<LI>Advanced Recursion: <CODE>Subsets</CODE>
<LI>A Word About Tail Recursion
</UL>
<TABLE><TR><TD><H3><A name="ch12">12. Example: Playfair Cipher</A></H3><TD>
(<A HREF="pdf/v1ch12.pdf">PDF</A>)
(<A HREF="v1ch12/playfair.html">HTML</A>)
</TABLE>
<P>
<I>This project demonstrates the use of a slightly complex cipher, in which a given
letter in the original text is not always represented by the same letter in
the coded version.</I>
<UL>
<LI>Data Redundancy
<LI>Composition of Functions
<LI>Conversational Front End
<LI>Further Explorations
<LI>Program Listing
</UL>
<TABLE><TR><TD><H3><A name="ch13">13. Planning</A></H3><TD>
(<A HREF="pdf/v1ch13.pdf">PDF</A>)
(<A HREF="v1ch13/plan.html">HTML</A>)
</TABLE>
<UL>
<LI>Structured Programming
<LI>Critique of Structured Programming
<LI>A Sample Project: Counting Poker Hands
<LI>An Initialization Procedure
<LI>Second Edition Second Thoughts
<LI>Planning and Debugging
<LI>Classifying Poker Hands
<LI>Embellishments
<LI>Putting the Project in a Context
<LI>Program Listing
</UL>
<TABLE><TR><TD><H3><A name="ch14">14. Example: Pitcher Problem Solver</A></H3><TD>
(<A HREF="pdf/v1ch14.pdf">PDF</A>)
(<A HREF="v1ch14/pour.html">HTML</A>)
</TABLE>
<P>
<I>This program solves the category of problems in which you are given
pitchers of certain sizes and asked to use them to measure a specified
amount of water from a river.</I>
<UL>
<LI>Tree Search
<LI>Depth-First and Breadth-First Searching
<LI>Data Representation
<LI>Abstract Data Types
<LI><CODE>Sentence</CODE> as a Combiner
<LI>Finding the Children of a Node
<LI>Computing a New State
<LI>More Data Abstraction
<LI>Printing the Results
<LI>Efficiency: What Really Matters?
<LI>Avoiding Meaningless Pourings
<LI>Eliminating Duplicate States
<LI>Stopping the Program Early
<LI>Further Explorations
<LI>Program Listing
</UL>
<TABLE><TR><TD><H3><A name="ch15">15. Debugging</A></H3><TD>
(<A HREF="pdf/v1ch15.pdf">PDF</A>)
(<A HREF="v1ch15/debug.html">HTML</A>)
</TABLE>
<UL>
<LI>Using Error Messages
<LI>Invalid Data
<LI>Incorrect Results
<LI>Tracing and Stepping
<LI>Pausing
<LI>Final Words of Wisdom
</UL>
<TABLE><TR><TD><H2>Appendices</H2><TD>
(<A HREF="pdf/v1ch16.pdf">backmatter in PDF</A>)
</TABLE>
<TABLE><TR><TD><H3>A. Running Berkeley Logo</H3><TD>
(<A HREF="v1ch16/versions.html">HTML</A>)
</TABLE>
<UL>
<LI>Getting Berkeley Logo
<LI>Berkeley Logo for DOS Machines
<LI>Berkeley Logo for the Macintosh
<LI>Berkeley Logo for Unix
</UL>
<TABLE><TR><TD><H3>B. GNU General Public License</H3><TD>
(<A HREF="v1ch16/appendix-gpl.html">HTML</A>)
</TABLE>
<TABLE><TR><TD><H3>Index of Defined Procedures</H3><TD>
(<A HREF="v1ch16/appuindex.html">HTML</A>)
</TABLE>
<TABLE><TR><TD><H3>General Index</H3><TD>
(<A HREF="v1ch16/appindex.html">HTML</A>)
</TABLE>
<P><A HREF="https://mitpress.mit.edu/books/computer-science-logo-style-second-edition-volume-1">MIT
Press web page for <CITE>Computer Science Logo Style</CITE></A>
<P>
<ADDRESS>
<A HREF="index.html">Brian Harvey</A>,
<CODE>bh@cs.berkeley.edu</CODE>
</ADDRESS>
</BODY>
</HTML>