about summary refs log tree commit diff stats
path: root/js/games/nluqo.github.io/~bh/ssch1/part1.html
diff options
context:
space:
mode:
Diffstat (limited to 'js/games/nluqo.github.io/~bh/ssch1/part1.html')
-rw-r--r--js/games/nluqo.github.io/~bh/ssch1/part1.html84
1 files changed, 84 insertions, 0 deletions
diff --git a/js/games/nluqo.github.io/~bh/ssch1/part1.html b/js/games/nluqo.github.io/~bh/ssch1/part1.html
new file mode 100644
index 0000000..6b80283
--- /dev/null
+++ b/js/games/nluqo.github.io/~bh/ssch1/part1.html
@@ -0,0 +1,84 @@
+<P>
+
+<P>
+<HTML>
+<HEAD>
+<TITLE>Simply Scheme: Introducing Computer Science, Part 1: Introduction: Functions</TITLE>
+</HEAD>
+<BODY>
+<CITE>Simply Scheme:</CITE>
+<CITE>Introducing Computer Science</CITE> 2/e Copyright (C) 1999 MIT
+<H2>Part I</H2>
+<H1>Introduction: Functions</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>University of California, Santa Barbara</CITE>
+<TR><TD align="right"><BR>
+<TR><TD align="right"><A HREF="../pdf/ssch01.pdf">Download PDF version</A>
+<TR><TD align="right"><A HREF="../ss-toc2.html">Back to Table of Contents</A>
+<TR><TD align="right"><A HREF="../ssch0/ack.html"><STRONG>BACK</STRONG></A>
+chapter thread <A HREF="showing.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><BIG>
+
+<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 &quot;first name,&quot; &quot;plural,&quot; and &quot;acronym.&quot; These functions
+have words and sentences as their arguments and values.
+
+<P>
+</BIG>
+<HR>
+<P><A HREF="../ss-toc2.html">(back to Table of Contents)</A><P>
+<A HREF="../ssch0/ack.html"><STRONG>BACK</STRONG></A>
+chapter thread <A HREF="showing.html"><STRONG>NEXT</STRONG></A>
+
+<P>
+<ADDRESS>
+<A HREF="../index.html">Brian Harvey</A>, 
+<CODE>bh@cs.berkeley.edu</CODE>
+</ADDRESS>
+</BODY>
+</HTML>