Brighton (U.K.): Underscore Consulting LLP, 2020. — 228 p.
Creative Scala is aimed at developers who have
no prior experience in Scala. It is designed to give you a fun introduction to
functional programming. We assume you have some very basic familiarity with another programming language but little or no experience with Scala or other functional languages. We have
three goals with this book:
To give an introduction to functional programming so that you can calculate and reason about programs, and pick up and understand other introductory books on functional programming.
To teach you
enough Scala that you can explore your own interests in and using Scala.
To present all this in a
fun, gentle, and interesting way via
two-dimensional computer graphics.
Our motivation comes from our own experience learning programming, studying functional programming, and teaching Scala to commercial developers. Firstly, we believe that functional programming is
the future. Since we’re assuming you have little programming experience we won’t go into the details of the differences between functional programming and object-oriented programming that you may have already experienced. Suffice to say there are different ways to think about and write computer programs, and we’ve chosen the functional programming approach. Although this book will give you the basic mental model required to become competent with Scala, you won’t finish knowing everything you need to be self-sufficient. For further advancement we recommend considering one of the many excellent Scala textbooks out there, including our own "Essential Scala". If you are working through the exercises on your own, we highly recommend joining our
Gitter chat room to provide get help with the exercises and provide feedback on the book.
Foreword.
Getting Started.
Expressions, Values, and Types.
Computing With Pictures.
Writing Larger Programs.
The Substitution Model of Evaluation.
Methods.
Structural Recursion.
Fractals.
Horticulture and Higher-order Functions.
Shapes, Sequences, and Stars.
Animation and Fireworks.
Turtle Algebra and Algebraic Data Types.
Composition of Generative Art.
Algebraic Data Types To Call Our Own.
App. A Syntax Quick Reference,
App. B Solutions to Exercises.
True PDF