about summary refs log tree commit diff stats
path: root/js/games/nluqo.github.io/~bh/part5.html
diff options
context:
space:
mode:
authorelioat <elioat@tilde.institute>2023-08-23 07:52:19 -0400
committerelioat <elioat@tilde.institute>2023-08-23 07:52:19 -0400
commit562a9a52d599d9a05f871404050968a5fd282640 (patch)
tree7d3305c1252c043bfe246ccc7deff0056aa6b5ab /js/games/nluqo.github.io/~bh/part5.html
parent5d012c6c011a9dedf7d0a098e456206244eb5a0f (diff)
downloadtour-562a9a52d599d9a05f871404050968a5fd282640.tar.gz
*
Diffstat (limited to 'js/games/nluqo.github.io/~bh/part5.html')
-rw-r--r--js/games/nluqo.github.io/~bh/part5.html75
1 files changed, 75 insertions, 0 deletions
diff --git a/js/games/nluqo.github.io/~bh/part5.html b/js/games/nluqo.github.io/~bh/part5.html
new file mode 100644
index 0000000..85453e7
--- /dev/null
+++ b/js/games/nluqo.github.io/~bh/part5.html
@@ -0,0 +1,75 @@
+<HTML>
+<HEAD>
+<TITLE>Simply Scheme part V introduction</TITLE>
+</HEAD>
+<BODY>
+<CITE>Simply Scheme</CITE> 2/e Copyright (C) 1999 MIT
+<H1>Abstraction</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>We've really been talking about abstraction all along.  Whenever you find
+yourself performing several similar computations, such as
+
+<PRE>
+> (sentence 'she (word 'run 's))
+(SHE RUNS)
+
+> (sentence 'she (word 'walk 's))
+(SHE WALKS)
+
+> (sentence 'she (word 'program 's))
+(SHE PROGRAMS)
+</PRE>
+
+and you capture the similarity in a procedure
+
+<PRE>
+(define (third-person verb)
+  (sentence 'she (word verb 's)))
+</PRE>
+
+<P>you're <EM>abstracting</EM> the pattern of the computation by
+expressing it in a form that leaves out the particular verb in any one
+instance.
+
+<P>In the preface we said that our approach to computer science is to teach you
+to think in larger chunks, so that you can fit larger problems in your mind
+at once; "abstraction" is the technical name for that chunking process.
+
+<P>In this part of the book we take a closer look at two specific kinds of
+abstraction.  One is <EM>data abstraction,</EM> which means the invention of
+new data types.  The other is the implementation of <EM>higher-order
+functions,</EM> an important category of the same process abstraction of which
+<CODE>third-person</CODE> is a trivial example.
+
+<P>Until now we've used words and sentences as though they were part of the
+natural order of things.  Now we'll discover that Scheme sentences exist
+only in our minds and take shape through the use of constructors and
+selectors (<CODE>sentence</CODE>, <CODE>first</CODE>, and so on) that we wrote.  The
+implementation of sentences is based on a more fundamental data type called
+<EM>lists.</EM> Then we'll see how lists can be used to invent another
+in-our-minds data type, <EM>trees.</EM>  (The technical term for an invented
+data type is an <EM>abstract</EM> data type.)
+
+<P>You already know how higher-order functions can express many computational
+processes in a very compact form.  Now we focus our attention on the
+higher-order <EM>procedures</EM> that implement those functions, exploring
+the mechanics by which we create these process abstractions.
+
+<P><A HREF="simply-toc.html">(back to Table of Contents)</A>
+
+</BODY>
+</HTML>
div class='alt'>
c83dca9c ^



9428990b ^
c83dca9c ^


6070c23e ^
c83dca9c ^



6070c23e ^
9428990b ^



c83dca9c ^


9428990b ^
c83dca9c ^








1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89