-
-
Notifications
You must be signed in to change notification settings - Fork 64
/
foreword-2.html
358 lines (349 loc) · 29.7 KB
/
foreword-2.html
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
<!doctype html>
<html lang="">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="Laika 1.0.0" />
<title>Foreword to the Second Edition</title>
<meta name="description" content="book" />
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:400|Source+Sans+Pro:300,400,600"
rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Crimson+Pro:400" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="css/creative-scala.css" />
<script src="js/toc.js"></script><script src="js/solution.js"></script><script src="main.js"></script>
<script> /* for avoiding page load transitions */</script>
</head>
<body>
<nav id="topbar">
<details>
<summary>Creative Scala: Form and Function</summary>
<ul class="nav-list">
<li class="level1 nav-leaf"><a href="foreword-1.html">Foreword to the First Edition</a></li>
<li class="level1 active nav-leaf"><a href="#">Foreword to the Second Edition</a></li>
<li class="level1 nav-node"><a href="setup/">Getting Started</a></li>
<li class="level2 nav-leaf"><a href="setup/background.html">Background</a></li>
<li class="level2 nav-leaf"><a href="setup/terminal.html">Our Recommended Setup</a></li>
<li class="level2 nav-leaf"><a href="setup/github.html">GitHub</a></li>
<li class="level2 nav-leaf"><a href="setup/intellij.html">IntelliJ</a></li>
<li class="level2 nav-leaf"><a href="setup/">Setup</a></li>
<li class="level1 nav-leaf"><a href="part-one-introduction.html">Part One: Introduction</a></li>
<li class="level1 nav-node"><a href="expressions/">Expressions, Values, and Types</a></li>
<li class="level2 nav-leaf"><a href="expressions/02-starting.html">Starting to Program</a></li>
<li class="level2 nav-leaf"><a href="expressions/03-expressions.html">Expressions and Values</a></li>
<li class="level2 nav-leaf"><a href="expressions/04-types.html">Types</a></li>
<li class="level2 nav-leaf"><a href="expressions/05-exercises.html">Exercises</a></li>
<li class="level2 nav-leaf"><a href="expressions/06-conclusions.html">Conclusions</a></li>
<li class="level1 nav-node"><a href="expanding-expressions/">Expanding Expressions</a></li>
<li class="level2 nav-leaf"><a href="expanding-expressions/02-literals.html">Literal Expressions</a></li>
<li class="level2 nav-leaf"><a href="expanding-expressions/03-objects.html">Values are Objects</a></li>
<li class="level2 nav-leaf"><a href="expanding-expressions/04-types.html">Types</a></li>
<li class="level2 nav-leaf"><a href="expanding-expressions/05-exercises.html">Exercises</a></li>
<li class="level1 nav-node"><a href="expressive-expressions/">Expressive Expressions</a></li>
<li class="level2 nav-leaf"><a href="expressive-expressions/01-images.html">Images</a></li>
<li class="level2 nav-leaf"><a href="expressive-expressions/02-layout.html">Layout</a></li>
<li class="level2 nav-leaf"><a href="expressive-expressions/03-color.html">Color</a></li>
<li class="level2 nav-leaf"><a href="expressive-expressions/04-creating-color.html">Creating Colors</a></li>
<li class="level2 nav-leaf"><a href="expressive-expressions/05-exercises.html">Exercises</a></li>
<li class="level2 nav-leaf"><a href="expressive-expressions/06-conclusions.html">Conclusions</a></li>
<li class="level1 nav-node"><a href="programs/">Writing Larger Programs</a></li>
<li class="level2 nav-leaf"><a href="programs/names.html">Names</a></li>
<li class="level2 nav-leaf"><a href="programs/abstraction.html">Abstraction</a></li>
<li class="level2 nav-leaf"><a href="programs/outside-worksheet.html">Working Without Worksheets</a></li>
<li class="level2 nav-leaf"><a href="programs/imports.html">Packages and Imports</a></li>
<li class="level2 nav-leaf"><a href="programs/sbt.html">Using The Build System</a></li>
<li class="level2 nav-leaf"><a href="programs/conclusions.html">Conclusions</a></li>
<li class="level1 nav-node"><a href="substitution/">The Substitution Model of Evaluation</a></li>
<li class="level2 nav-leaf"><a href="substitution/substitution.html">Substitution</a></li>
<li class="level2 nav-leaf"><a href="substitution/order.html">Order of Evaluation</a></li>
<li class="level2 nav-leaf"><a href="substitution/local-reasoning.html">Local Reasoning</a></li>
<li class="level2 nav-leaf"><a href="substitution/conclusions.html">Conclusions</a></li>
<li class="level1 nav-node"><a href="methods/">Methods without Madness</a></li>
<li class="level2 nav-leaf"><a href="methods/methods.html">Methods</a></li>
<li class="level2 nav-leaf"><a href="methods/syntax.html">Method Syntax</a></li>
<li class="level2 nav-leaf"><a href="methods/semantics.html">Method Semantics</a></li>
<li class="level2 nav-leaf"><a href="methods/writing-methods.html">Writing Methods</a></li>
<li class="level2 nav-leaf"><a href="methods/conclusions.html">Conclusions</a></li>
<li class="level1 nav-node"><a href="recursion/">Structural Recursion over the Natural Numbers</a></li>
<li class="level2 nav-leaf"><a href="recursion/boxes.html">A Line of Boxes</a></li>
<li class="level2 nav-leaf"><a href="recursion/natural-numbers.html">The Natural Numbers</a></li>
<li class="level2 nav-leaf"><a href="recursion/match.html">Match Expressions</a></li>
<li class="level2 nav-leaf"><a href="recursion/substitution.html">Reasoning about Recursion</a></li>
<li class="level2 nav-leaf"><a href="recursion/conclusions.html">Conclusions</a></li>
<li class="level1 nav-node"><a href="fractals/">Fractals</a></li>
<li class="level2 nav-leaf"><a href="fractals/fractals.html">Fun with Fractals</a></li>
<li class="level2 nav-leaf"><a href="fractals/nested-methods.html">Nested Methods</a></li>
<li class="level2 nav-leaf"><a href="fractals/auxillary-parameter.html">Auxiliary Parameters</a></li>
<li class="level2 nav-leaf"><a href="fractals/exercises.html">Exercises</a></li>
<li class="level2 nav-leaf"><a href="fractals/conclusions.html">Conclusions</a></li>
<li class="level1 nav-node"><a href="polygons/">Points, Paths, and Polygons</a></li>
<li class="level2 nav-leaf"><a href="polygons/02-polar.html">Polar Coordinates</a></li>
<li class="level2 nav-leaf"><a href="polygons/03-path.html">Paths</a></li>
<li class="level2 nav-leaf"><a href="polygons/04-creative.html">Going Further</a></li>
<li class="level2 nav-leaf"><a href="polygons/05-conclusions.html">Conclusions</a></li>
<li class="level1 nav-node"><a href="flowers/">Functions and Flowers</a></li>
<li class="level2 nav-leaf"><a href="flowers/functions.html">Functions as Abstractions</a></li>
<li class="level2 nav-leaf"><a href="flowers/fun.html">Fun with Functions</a></li>
<li class="level2 nav-leaf"><a href="flowers/parametric-curves.html">Parametric Curves</a></li>
<li class="level2 nav-leaf"><a href="flowers/flowers.html">Flowers and Other Curves</a></li>
<li class="level2 nav-leaf"><a href="flowers/conclusions.html">Conclusions</a></li>
<li class="level1 nav-node"><a href="cycles/">Composition and Cycles</a></li>
<li class="level2 nav-leaf"><a href="cycles/composition.html">Function Composition</a></li>
<li class="level2 nav-leaf"><a href="cycles/fun.html">Fun with Composition</a></li>
<li class="level2 nav-leaf"><a href="cycles/interpolation.html">Interpolation</a></li>
<li class="level2 nav-leaf"><a href="cycles/epicycles.html">Epicycles</a></li>
<li class="level2 nav-leaf"><a href="cycles/culmination.html">Bringing it Together</a></li>
<li class="level2 nav-leaf"><a href="cycles/conclusions.html">Conclusions</a></li>
<li class="level1 nav-leaf"><a href="part-one-conclusions.html">Part One: Conclusions</a></li>
<li class="level1 nav-leaf"><a href="part-two-introduction.html">Part Two: Introduction</a></li>
<li class="level1 nav-node"><a href="2-explore/">Exploring Data Science</a></li>
<li class="level2 nav-leaf"><a href="2-explore/loading.html">Loading Data</a></li>
<li class="level2 nav-leaf"><a href="2-explore/initial.html">Initial Investigations</a></li>
<li class="level2 nav-leaf"><a href="2-explore/summarize.html">Summarizing Data</a></li>
<li class="level1 nav-node"><a href="2-loading-data/">Loading Data</a></li>
<li class="level2 nav-leaf"><a href="2-loading-data/source.html">Loading Data Using a Source</a></li>
<li class="level1 nav-header">adt</li>
<li class="level2 nav-leaf"><a href="adt/">Algebraic Data Types To Call Our Own</a></li>
<li class="level2 nav-leaf"><a href="adt/turtle.html">Build Your Own Turtle</a></li>
<li class="level2 nav-leaf"><a href="adt/adt.html">Algebraic Data Types</a></li>
<li class="level1 nav-leaf"><a href="intro.html">Introduction</a></li>
<li class="level1 nav-header">turtles</li>
<li class="level2 nav-leaf"><a href="turtles/">Turtle Algebra and Algebraic Data Types</a></li>
<li class="level2 nav-leaf"><a href="turtles/exercises.html">Exercises</a></li>
<li class="level2 nav-leaf"><a href="turtles/turtles.html">Controlling the Turtle</a></li>
<li class="level2 nav-leaf"><a href="turtles/branching.html">Branching Structures</a></li>
<li class="level1 nav-header">sequences</li>
<li class="level2 nav-leaf"><a href="sequences/paths.html">Paths</a></li>
<li class="level2 nav-leaf"><a href="sequences/">Shapes, Sequences, and Stars</a></li>
<li class="level2 nav-leaf"><a href="sequences/lists.html">Working with Lists</a></li>
<li class="level2 nav-leaf"><a href="sequences/stars.html">My God, It's Full of Stars!</a></li>
<li class="level2 nav-leaf"><a href="sequences/map.html">Transforming Sequences</a></li>
<li class="level1 nav-leaf"><a href="links.html">links.md</a></li>
<li class="level1 nav-header">declarations</li>
<li class="level2 nav-leaf"><a href="declarations/color-palette.html">Extended Exercise: Color Palettes</a></li>
<li class="level2 nav-leaf"><a href="declarations/">Declarations</a></li>
<li class="level2 nav-leaf"><a href="declarations/method-declarations.html">Method Declarations</a></li>
<li class="level2 nav-leaf"><a href="declarations/take-home-points.html">Take Home Points</a></li>
<li class="level2 nav-leaf"><a href="declarations/value-declarations.html">Value Declarations</a></li>
<li class="level1 nav-header">animation</li>
<li class="level2 nav-leaf"><a href="animation/reactor.html">Reactors</a></li>
<li class="level2 nav-leaf"><a href="animation/">Animation and Fireworks</a></li>
<li class="level2 nav-leaf"><a href="animation/easing.html">Easing Functions</a></li>
<li class="level1 nav-header">collections</li>
<li class="level2 nav-leaf"><a href="collections/paths.html">Drawing Paths</a></li>
<li class="level2 nav-leaf"><a href="collections/">Collections {#collections}</a></li>
<li class="level2 nav-leaf"><a href="collections/transform.html">Transforming Sequences</a></li>
<li class="level2 nav-leaf"><a href="collections/take-home-points.html">Take Home Points</a></li>
<li class="level2 nav-leaf"><a href="collections/create.html">Creating Sequences</a></li>
<li class="level1 nav-header">quickreference</li>
<li class="level2 nav-leaf"><a href="quickreference/">Syntax Quick Reference {#syntax-quick-reference}</a></li>
<li class="level1 nav-header">generative</li>
<li class="level2 nav-leaf"><a href="generative/for.html">For Comprehensions</a></li>
<li class="level2 nav-leaf"><a href="generative/flatmap.html">Combining Random Values</a></li>
<li class="level2 nav-leaf"><a href="generative/">Composition of Generative Art</a></li>
<li class="level2 nav-leaf"><a href="generative/product.html">Combining Random Values</a></li>
<li class="level2 nav-leaf"><a href="generative/api.html">Exploring Random</a></li>
<li class="level2 nav-leaf"><a href="generative/random.html">Randomness without Effect</a></li>
<li class="level2 nav-leaf"><a href="generative/exercises.html">Exercises</a></li>
<li class="level2 nav-leaf"><a href="generative/generative.html">Generative Art</a></li>
<li class="level1 nav-header">summary</li>
<li class="level2 nav-leaf"><a href="summary/">Summary</a></li>
<li class="level1 nav-header">fp</li>
<li class="level2 nav-leaf"><a href="fp/functions.html">Functions as Values</a></li>
<li class="level2 nav-leaf"><a href="fp/">(Functional) Programming</a></li>
<li class="level2 nav-leaf"><a href="fp/recursion.html">Recursive Algorithms</a></li>
<li class="level2 nav-leaf"><a href="fp/take-home-points.html">Take Home Points</a></li>
<li class="level1 nav-header">data</li>
<li class="level2 nav-leaf"><a href="data/">Creating and Working With Data</a></li>
<li class="level2 nav-leaf"><a href="data/case-classes.html">Case Classes</a></li>
<li class="level2 nav-leaf"><a href="data/data.html">Data</a></li>
<li class="level1 nav-leaf"><a href="solutions.html">Solutions to Exercises {#solutions}</a></li>
</ul>
</details>
</nav>
<nav id="sidebar">
<ul class="nav-list">
<li class="level1 nav-leaf"><a href="index.html">Creative Scala: Form and Function</a></li>
<li class="level1 nav-leaf"><a href="foreword-1.html">Foreword to the First Edition</a></li>
<li class="level1 active nav-leaf"><a href="#">Foreword to the Second Edition</a></li>
<li class="level1 nav-node"><a href="setup/">Getting Started</a></li>
<li class="level2 nav-leaf"><a href="setup/background.html">Background</a></li>
<li class="level2 nav-leaf"><a href="setup/terminal.html">Our Recommended Setup</a></li>
<li class="level2 nav-leaf"><a href="setup/github.html">GitHub</a></li>
<li class="level2 nav-leaf"><a href="setup/intellij.html">IntelliJ</a></li>
<li class="level2 nav-leaf"><a href="setup/">Setup</a></li>
<li class="level1 nav-leaf"><a href="part-one-introduction.html">Part One: Introduction</a></li>
<li class="level1 nav-node"><a href="expressions/">Expressions, Values, and Types</a></li>
<li class="level2 nav-leaf"><a href="expressions/02-starting.html">Starting to Program</a></li>
<li class="level2 nav-leaf"><a href="expressions/03-expressions.html">Expressions and Values</a></li>
<li class="level2 nav-leaf"><a href="expressions/04-types.html">Types</a></li>
<li class="level2 nav-leaf"><a href="expressions/05-exercises.html">Exercises</a></li>
<li class="level2 nav-leaf"><a href="expressions/06-conclusions.html">Conclusions</a></li>
<li class="level1 nav-node"><a href="expanding-expressions/">Expanding Expressions</a></li>
<li class="level2 nav-leaf"><a href="expanding-expressions/02-literals.html">Literal Expressions</a></li>
<li class="level2 nav-leaf"><a href="expanding-expressions/03-objects.html">Values are Objects</a></li>
<li class="level2 nav-leaf"><a href="expanding-expressions/04-types.html">Types</a></li>
<li class="level2 nav-leaf"><a href="expanding-expressions/05-exercises.html">Exercises</a></li>
<li class="level1 nav-node"><a href="expressive-expressions/">Expressive Expressions</a></li>
<li class="level2 nav-leaf"><a href="expressive-expressions/01-images.html">Images</a></li>
<li class="level2 nav-leaf"><a href="expressive-expressions/02-layout.html">Layout</a></li>
<li class="level2 nav-leaf"><a href="expressive-expressions/03-color.html">Color</a></li>
<li class="level2 nav-leaf"><a href="expressive-expressions/04-creating-color.html">Creating Colors</a></li>
<li class="level2 nav-leaf"><a href="expressive-expressions/05-exercises.html">Exercises</a></li>
<li class="level2 nav-leaf"><a href="expressive-expressions/06-conclusions.html">Conclusions</a></li>
<li class="level1 nav-node"><a href="programs/">Writing Larger Programs</a></li>
<li class="level2 nav-leaf"><a href="programs/names.html">Names</a></li>
<li class="level2 nav-leaf"><a href="programs/abstraction.html">Abstraction</a></li>
<li class="level2 nav-leaf"><a href="programs/outside-worksheet.html">Working Without Worksheets</a></li>
<li class="level2 nav-leaf"><a href="programs/imports.html">Packages and Imports</a></li>
<li class="level2 nav-leaf"><a href="programs/sbt.html">Using The Build System</a></li>
<li class="level2 nav-leaf"><a href="programs/conclusions.html">Conclusions</a></li>
<li class="level1 nav-node"><a href="substitution/">The Substitution Model of Evaluation</a></li>
<li class="level2 nav-leaf"><a href="substitution/substitution.html">Substitution</a></li>
<li class="level2 nav-leaf"><a href="substitution/order.html">Order of Evaluation</a></li>
<li class="level2 nav-leaf"><a href="substitution/local-reasoning.html">Local Reasoning</a></li>
<li class="level2 nav-leaf"><a href="substitution/conclusions.html">Conclusions</a></li>
<li class="level1 nav-node"><a href="methods/">Methods without Madness</a></li>
<li class="level2 nav-leaf"><a href="methods/methods.html">Methods</a></li>
<li class="level2 nav-leaf"><a href="methods/syntax.html">Method Syntax</a></li>
<li class="level2 nav-leaf"><a href="methods/semantics.html">Method Semantics</a></li>
<li class="level2 nav-leaf"><a href="methods/writing-methods.html">Writing Methods</a></li>
<li class="level2 nav-leaf"><a href="methods/conclusions.html">Conclusions</a></li>
<li class="level1 nav-node"><a href="recursion/">Structural Recursion over the Natural Numbers</a></li>
<li class="level2 nav-leaf"><a href="recursion/boxes.html">A Line of Boxes</a></li>
<li class="level2 nav-leaf"><a href="recursion/natural-numbers.html">The Natural Numbers</a></li>
<li class="level2 nav-leaf"><a href="recursion/match.html">Match Expressions</a></li>
<li class="level2 nav-leaf"><a href="recursion/substitution.html">Reasoning about Recursion</a></li>
<li class="level2 nav-leaf"><a href="recursion/conclusions.html">Conclusions</a></li>
<li class="level1 nav-node"><a href="fractals/">Fractals</a></li>
<li class="level2 nav-leaf"><a href="fractals/fractals.html">Fun with Fractals</a></li>
<li class="level2 nav-leaf"><a href="fractals/nested-methods.html">Nested Methods</a></li>
<li class="level2 nav-leaf"><a href="fractals/auxillary-parameter.html">Auxiliary Parameters</a></li>
<li class="level2 nav-leaf"><a href="fractals/exercises.html">Exercises</a></li>
<li class="level2 nav-leaf"><a href="fractals/conclusions.html">Conclusions</a></li>
<li class="level1 nav-node"><a href="polygons/">Points, Paths, and Polygons</a></li>
<li class="level2 nav-leaf"><a href="polygons/02-polar.html">Polar Coordinates</a></li>
<li class="level2 nav-leaf"><a href="polygons/03-path.html">Paths</a></li>
<li class="level2 nav-leaf"><a href="polygons/04-creative.html">Going Further</a></li>
<li class="level2 nav-leaf"><a href="polygons/05-conclusions.html">Conclusions</a></li>
<li class="level1 nav-node"><a href="flowers/">Functions and Flowers</a></li>
<li class="level2 nav-leaf"><a href="flowers/functions.html">Functions as Abstractions</a></li>
<li class="level2 nav-leaf"><a href="flowers/fun.html">Fun with Functions</a></li>
<li class="level2 nav-leaf"><a href="flowers/parametric-curves.html">Parametric Curves</a></li>
<li class="level2 nav-leaf"><a href="flowers/flowers.html">Flowers and Other Curves</a></li>
<li class="level2 nav-leaf"><a href="flowers/conclusions.html">Conclusions</a></li>
<li class="level1 nav-node"><a href="cycles/">Composition and Cycles</a></li>
<li class="level2 nav-leaf"><a href="cycles/composition.html">Function Composition</a></li>
<li class="level2 nav-leaf"><a href="cycles/fun.html">Fun with Composition</a></li>
<li class="level2 nav-leaf"><a href="cycles/interpolation.html">Interpolation</a></li>
<li class="level2 nav-leaf"><a href="cycles/epicycles.html">Epicycles</a></li>
<li class="level2 nav-leaf"><a href="cycles/culmination.html">Bringing it Together</a></li>
<li class="level2 nav-leaf"><a href="cycles/conclusions.html">Conclusions</a></li>
<li class="level1 nav-leaf"><a href="part-one-conclusions.html">Part One: Conclusions</a></li>
<li class="level1 nav-leaf"><a href="part-two-introduction.html">Part Two: Introduction</a></li>
<li class="level1 nav-node"><a href="2-explore/">Exploring Data Science</a></li>
<li class="level2 nav-leaf"><a href="2-explore/loading.html">Loading Data</a></li>
<li class="level2 nav-leaf"><a href="2-explore/initial.html">Initial Investigations</a></li>
<li class="level2 nav-leaf"><a href="2-explore/summarize.html">Summarizing Data</a></li>
<li class="level1 nav-node"><a href="2-loading-data/">Loading Data</a></li>
<li class="level2 nav-leaf"><a href="2-loading-data/source.html">Loading Data Using a Source</a></li>
<li class="level1 nav-header">adt</li>
<li class="level2 nav-leaf"><a href="adt/">Algebraic Data Types To Call Our Own</a></li>
<li class="level2 nav-leaf"><a href="adt/turtle.html">Build Your Own Turtle</a></li>
<li class="level2 nav-leaf"><a href="adt/adt.html">Algebraic Data Types</a></li>
<li class="level1 nav-leaf"><a href="intro.html">Introduction</a></li>
<li class="level1 nav-header">turtles</li>
<li class="level2 nav-leaf"><a href="turtles/">Turtle Algebra and Algebraic Data Types</a></li>
<li class="level2 nav-leaf"><a href="turtles/exercises.html">Exercises</a></li>
<li class="level2 nav-leaf"><a href="turtles/turtles.html">Controlling the Turtle</a></li>
<li class="level2 nav-leaf"><a href="turtles/branching.html">Branching Structures</a></li>
<li class="level1 nav-header">sequences</li>
<li class="level2 nav-leaf"><a href="sequences/paths.html">Paths</a></li>
<li class="level2 nav-leaf"><a href="sequences/">Shapes, Sequences, and Stars</a></li>
<li class="level2 nav-leaf"><a href="sequences/lists.html">Working with Lists</a></li>
<li class="level2 nav-leaf"><a href="sequences/stars.html">My God, It's Full of Stars!</a></li>
<li class="level2 nav-leaf"><a href="sequences/map.html">Transforming Sequences</a></li>
<li class="level1 nav-leaf"><a href="links.html">links.md</a></li>
<li class="level1 nav-header">declarations</li>
<li class="level2 nav-leaf"><a href="declarations/color-palette.html">Extended Exercise: Color Palettes</a></li>
<li class="level2 nav-leaf"><a href="declarations/">Declarations</a></li>
<li class="level2 nav-leaf"><a href="declarations/method-declarations.html">Method Declarations</a></li>
<li class="level2 nav-leaf"><a href="declarations/take-home-points.html">Take Home Points</a></li>
<li class="level2 nav-leaf"><a href="declarations/value-declarations.html">Value Declarations</a></li>
<li class="level1 nav-header">animation</li>
<li class="level2 nav-leaf"><a href="animation/reactor.html">Reactors</a></li>
<li class="level2 nav-leaf"><a href="animation/">Animation and Fireworks</a></li>
<li class="level2 nav-leaf"><a href="animation/easing.html">Easing Functions</a></li>
<li class="level1 nav-header">collections</li>
<li class="level2 nav-leaf"><a href="collections/paths.html">Drawing Paths</a></li>
<li class="level2 nav-leaf"><a href="collections/">Collections {#collections}</a></li>
<li class="level2 nav-leaf"><a href="collections/transform.html">Transforming Sequences</a></li>
<li class="level2 nav-leaf"><a href="collections/take-home-points.html">Take Home Points</a></li>
<li class="level2 nav-leaf"><a href="collections/create.html">Creating Sequences</a></li>
<li class="level1 nav-header">quickreference</li>
<li class="level2 nav-leaf"><a href="quickreference/">Syntax Quick Reference {#syntax-quick-reference}</a></li>
<li class="level1 nav-header">generative</li>
<li class="level2 nav-leaf"><a href="generative/for.html">For Comprehensions</a></li>
<li class="level2 nav-leaf"><a href="generative/flatmap.html">Combining Random Values</a></li>
<li class="level2 nav-leaf"><a href="generative/">Composition of Generative Art</a></li>
<li class="level2 nav-leaf"><a href="generative/product.html">Combining Random Values</a></li>
<li class="level2 nav-leaf"><a href="generative/api.html">Exploring Random</a></li>
<li class="level2 nav-leaf"><a href="generative/random.html">Randomness without Effect</a></li>
<li class="level2 nav-leaf"><a href="generative/exercises.html">Exercises</a></li>
<li class="level2 nav-leaf"><a href="generative/generative.html">Generative Art</a></li>
<li class="level1 nav-header">summary</li>
<li class="level2 nav-leaf"><a href="summary/">Summary</a></li>
<li class="level1 nav-header">fp</li>
<li class="level2 nav-leaf"><a href="fp/functions.html">Functions as Values</a></li>
<li class="level2 nav-leaf"><a href="fp/">(Functional) Programming</a></li>
<li class="level2 nav-leaf"><a href="fp/recursion.html">Recursive Algorithms</a></li>
<li class="level2 nav-leaf"><a href="fp/take-home-points.html">Take Home Points</a></li>
<li class="level1 nav-header">data</li>
<li class="level2 nav-leaf"><a href="data/">Creating and Working With Data</a></li>
<li class="level2 nav-leaf"><a href="data/case-classes.html">Case Classes</a></li>
<li class="level2 nav-leaf"><a href="data/data.html">Data</a></li>
<li class="level1 nav-leaf"><a href="solutions.html">Solutions to Exercises {#solutions}</a></li>
</ul>
</nav>
<div id="content">
<main class="content">
<h1 id="foreword-to-the-second-edition" class="title">Foreword to the Second Edition</h1>
<p>The real foreword will be written when the book is almost finished and I'll have a better idea of how much I've been able to realize my goals for the book. Nonetheless it's useful to have something here so people reading the drafts have some context.</p>
<p>Compared to the first edition, the intention for the second edition of Creative Scala is:</p>
<ul>
<li>
<p>to cover more material, so that one can read Creative Scala and be reasonably comfortable programming in Scala (or another language; a majority of the material should be transferable);</p>
</li>
<li>
<p>show how the concepts apply to more domains than the "creative computing" examples that make up the first edition. I'm currently thinking of web development, data analysis, and possibly interpreters;</p>
</li>
<li>
<p>serve as a solid basis for building the ScalaBridge curriculum; and</p>
</li>
<li>
<p>aiming for great rather than good enough.</p>
</li>
</ul>
<p>Many things will stay the same:</p>
<ul>
<li>a focus on fundamentals of programming language theory, such as models of evaluation, and the patterns behind programming, such as structural recursion; and</li>
<li>a target audience of programmers who are new to coding and without a STEM background. This means some material on processes might be absent when targetting more experienced developers.</li>
</ul>
<p>One more thing: the name may change as well! I'm not sure Creative Scala fits the book I'm aiming for.</p>
<h2 id="acknowledgements" class="section">Acknowledgements</h2>
<p>The members of ScalaBridge London, with particular mention to the following for reporting bugs and suggesting improvements:</p>
<ul>
<li>Jess Gordon</li>
<li>Kim Morgan</li>
</ul>
<div class="flex flex-row justify-between">
<a class="pageNavigation" href="foreword-1.html">←Foreword to the First Edition</a> <a class="pageNavigation" href="setup/">Getting Started→</a>
</div>
</main>
<footer>Creative Scala is copyright Noel Welsh</footer>
</div>
</div>
</body>
</html>