did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

We're the #1 textbook rental company. Let us show you why.

9780521644082

The Haskell School of Expression: Learning Functional Programming through Multimedia

by
  • ISBN13:

    9780521644082

  • ISBN10:

    0521644089

  • Format: Paperback
  • Copyright: 2000-02-28
  • Publisher: Cambridge University Press

Note: Supplemental materials are not guaranteed with Rental or Used book purchases.

Purchase Benefits

List Price: $74.99 Save up to $25.12
  • Rent Book $49.87
    Add to Cart Free Shipping Icon Free Shipping

    TERM
    PRICE
    DUE
    SPECIAL ORDER: 1-2 WEEKS
    *This item is part of an exclusive publisher rental program and requires an additional convenience fee. This fee will be reflected in the shopping cart.

Supplemental Materials

What is included with this book?

Summary

Functional programming is a style of programming that emphasizes the use of functions (in contrast to object-oriented programming, which emphasizes the use of objects). It has become popular in recent years because of its simplicity, conciseness, and clarity. This book teaches functional programming as a way of thinking and problem solving, using Haskell, the most popular purely functional language. Rather than using the conventional (boring) mathematical examples commonly found in other programming language textbooks, the author uses examples drawn from multimedia applications, including graphics, animation, and computer music, thus rewarding the reader with working programs for inherently more interesting applications. Aimed at both beginning and advanced programmers, this tutorial begins with a gentle introduction to functional programming and moves rapidly on to more advanced topics. Details about progamming in Haskell are presented in boxes throughout the text so they can be easily found and referred to.

Table of Contents

Preface xiii
Problem Solving, Programming, and Calculation
1(20)
Computation by Calculation in Haskell
2(4)
Expressions, Values, and Types
6(2)
Function Types and Type Signatures
8(2)
Abstraction, Abstraction, Abstraction
10(7)
Naming
10(2)
Functional Abstraction
12(1)
Data Abstraction
13(4)
Code Reuse and Modularity
17(1)
Beware of Programming with Numbers
17(4)
A Module of Shapes: Part I
21(14)
Geometric Shapes
22(3)
Areas of Shapes
25(9)
Cleaning Up
34(1)
Simple Graphics
35(13)
Basic Input/Output
36(4)
Graphics Windows
40(2)
Drawing Graphics Other Than Text
42(1)
Some Examples
43(5)
Shapes II: Drawing Shapes
48(8)
Dealing With Different Coordinate Systems
48(3)
Converting Shapes to Graphics
51(1)
Some Examples
52(2)
In Retrospect
54(2)
Polymorphic and Higher-Order Functions
56(18)
Polymorphic Types
56(2)
Abstraction Over Recursive Definitions
58(5)
Map is Polymorphic
59(1)
Using map
60(3)
Append
63(2)
The Efficiency and Fixity of Append
64(1)
Fold
65(4)
Haskell's Folds
67(1)
Why Two Folds?
68(1)
A Final Example: Reverse
69(2)
Errors
71(3)
Shapes III: Perimeters of Shapes
74(7)
Perimeters of Shapes
74(7)
Trees
81(6)
A Tree Data Type
81(2)
Operations on Trees
83(1)
Arithmetic Expressions
84(3)
A Module of Regions
87(18)
The Region Data Type
87(4)
The Meaning of Shapes and Regions
91(8)
The Meaning of Shapes
92(1)
The Encoding of the Meaning of Shapes
93(3)
The Meaning of Regions
96(1)
The Encoding of the Meaning of Regions
97(2)
Algebraic Properties of Regions
99(2)
In Retrospect
101(4)
More About Higher-Order Functions
105(9)
Currying
105(3)
Sections
108(2)
Anonymous Functions
110(1)
Function Composition
111(3)
Drawing Regions
114(17)
The Picture Data Type
115(1)
Drawing Pictures
115(1)
Drawing Regions
116(10)
From Regions to Graphics Regions: First Attempt
117(2)
From Regions to Graphics Regions: Second Attempt
119(2)
Translating Shapes into Graphics Regions
121(2)
Examples
123(3)
User Interaction
126(1)
Putting it all Together
127(4)
Examples
128(3)
Proof by Induction
131(16)
Induction and Recursion
131(1)
Examples of List Induction
132(5)
Proving Function Equivalences
133(4)
Useful Properties on Lists
137(4)
Function Strictness
137(4)
Induction on Other Data Types
141(6)
A More Efficient Exponentiation Function
143(4)
Qualified Types
147(16)
Equality
148(2)
Defining Your Own Type Classes
150(3)
Inheritance
153(1)
Haskell's Standard Type Classes
154(3)
Derived Instances
157(3)
Reasoning With Type Classes
160(3)
A Module of Simple Animations
163(24)
What is an Animation?
163(2)
Representing an Animation
165(2)
An Animator
167(5)
Fun With Type Classes
172(5)
Rising to the Level of Animations
172(1)
Type Classes to the Rescue
172(4)
Defining New Type Classes for Behaviors
176(1)
Lifting to the Limit
177(2)
Time Transformation
179(1)
A Final Example: A Kaleidoscope Program
180(7)
Programming With Streams
187(21)
Lazy Evaluation
187(3)
Recursive Streams
190(3)
Stream Diagrams
193(2)
Lazy Patterns
195(3)
Memoization
198(3)
Inductive Properties of Infinite Lists
201(7)
A Module of Reactive Animations
208(28)
FAL by Example
209(5)
Basic Reactivity
209(1)
Event Choice
210(1)
Recursive Event Processing
211(1)
Events with Data
212(1)
Snapshot
212(1)
Boolean Events
212(1)
Integration
213(1)
Implementing FAL
214(6)
An Implementation Strategy
215(2)
Incremental Sampling
217(2)
Final Refinements
219(1)
Representing Events
220(1)
The Implementation
220(9)
Behaviors
221(4)
Events
225(3)
An Example
228(1)
Extensions
229(4)
Variations on switch
231(1)
Mouse Motion
232(1)
Paddleball in Twenty Lines
233(3)
Communicating With the Outside World
236(9)
Files, Channels, and Handles
236(3)
Why Use Handles?
238(1)
Channels
238(1)
Exception Handling
239(3)
First-Class Channels and Concurrency
242(3)
Rendering Reactive Animations
245(4)
Preliminaries
245(1)
Reactimate
246(1)
Window User
247(2)
Higher-Order Types
249(16)
The Functor Class
249(2)
The Monad Class
251(8)
Other Instances of Monad
255(4)
Other Monadic Operations
259(1)
The MonadPlus Class
259(2)
State Monads
261(2)
Type Class Type Errors
263(2)
An Imperative Robot Language
265(22)
IRL by Example
266(4)
Robot is a State Monad
270(2)
The Implementation of IRL Commands
272(4)
Robot Orientation
273(1)
Using the Pen
274(1)
Playing With Coins
274(1)
Logic and Control
274(2)
All the World is a Grid
276(5)
Robot Graphics
281(1)
Putting it all Together
282(5)
Functional Music Composition
287(17)
The Music Data Type
288(5)
Higher-Level Constructions
293(7)
Lines and Chords
293(1)
Delay and Repeat
293(1)
Polyrhythms
294(1)
Determining Duration
295(1)
Reversing Musical Structure
295(1)
Truncating Parallel Composition
296(1)
Trills
297(1)
Percussion
298(2)
A Couple of Final Examples
300(4)
Cascades
300(1)
Self-Similar (Fractal) Music
301(3)
Interpreting Functional Music
304(9)
Interpreting Music: A Performance
305(3)
An Algebra of Music
308(5)
From Performance to MIDI
313(8)
An Introduction to MIDI
313(1)
The Conversion Process
314(5)
Putting It All Together
319(2)
A Tour of the PreludeList Module
321(11)
The PreludeList Module
321(1)
Simple List Selector Functions
322(1)
Index-Based Selector Functions
323(1)
Predicate-Based Selector Functions
324(1)
Fold-like Functions
325(2)
List Generators
327(1)
String-Based Functions
327(1)
Boolean List Functions
328(1)
List Membership Functions
329(1)
Arithmetic on Lists
329(1)
List Combining Functions
330(2)
A Tour of Haskell's Standard Type Classes
332(13)
The Ordered Class
332(1)
The Enumeration Class
333(1)
The Bounded Class
334(1)
The Show Class
334(4)
The Read Class
338(3)
The Index Class
341(2)
The Numeric Classes
343(2)
A Built-in Types Are Not Special 345(3)
B Pattern-Matching Details 348(5)
Bibliography 353(4)
Index 357

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Rewards Program