Déjà client ? Identifiez-vous

Mot de passe oublié ?

Nouveau client ?

CRÉER VOTRE COMPTE
The Haskell School of Expression
Ajouter à une liste

Librairie Eyrolles - Paris 5e
Indisponible

The Haskell School of Expression

The Haskell School of Expression

Learning Functional Programming Through Multimedia

Paul Hudak

Parution le 10/01/2000

Résumé

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 textbook, aimed at beginning and advanced programmers, 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, this text uses examples drawn from multimedia applications, including graphics, animation, and computer music, thus rewarding the student with working programs for inherently more interesting applications.

Table of Contents

Preface
Problem Solving, Programming, and Calculation
Computation by Calculation in Haskell
Expressions, Values, and Types
Function Types and Type Signatures
Abstraction, Abstraction, Abstraction
Naming
Functional Abstraction
Data Abstraction
Code Reuse and Modularity
Beware of Programming with Numbers
A Module of Shapes: Part I
Geometric Shapes
Areas of Shapes
Cleaning Up
Simple Graphics
Basic Input/Output
Graphics Windows
Drawing Graphics Other Than Text
Some Examples
Shapes II: Drawing Shapes
Dealing With Different Coordinate Systems
Converting Shapes to Graphics
Some Examples
In Retrospect
Polymorphic and Higher-Order Functions
Polymorphic Types
Abstraction Over Recursive Definitions
Map is Polymorphic
Using map
Append
The Efficiency and Fixity of Append
Fold
Haskell's Folds
Why Two Folds?
A Final Example: Reverse
Errors
Shapes III: Perimeters of Shapes
Perimeters of Shapes
Trees
A Tree Data Type
Operations on Trees
Arithmetic Expressions
A Module of Regions
The Region Data Type
The Meaning of Shapes and Regions
The Meaning of Shapes
The Encoding of the Meaning of Shapes
The Meaning of Regions
The Encoding of the Meaning of Regions
Algebraic Properties of Regions
In Retrospect
More About Higher-Order Functions
Currying
Sections
Anonymous Functions
Function Composition
Drawing Regions
The Picture Data Type
Drawing Pictures
Drawing Regions
From Regions to Graphics Regions: First Attempt
From Regions to Graphics Regions: Second Attempt
Translating Shapes into Graphics Regions
Examples
User Interaction
Putting it all Together
Examples
Proof by Induction
Induction and Recursion
Examples of List Induction
Proving Function Equivalences
Useful Properties on Lists
Function Strictness
Induction on Other Data Types
A More Efficient Exponentiation Function
Qualified Types
Equality
Defining Your Own Type Classes
Inheritance
Haskell's Standard Type Classes
Derived Instances
Reasoning With Type Classes
A Module of Simple Animations
What is an Animation?
Representing an Animation
An Animator
Fun With Type Classes
Rising to the Level of Animations
Type Classes to the Rescue
Defining New Type Classes for Behaviors
Lifting to the Limit
Time Transformation
A Final Example: A Kaleidoscope Program
Programming With Streams
Lazy Evaluation
Recursive Streams
Stream Diagrams
Lazy Patterns
Memoization
Inductive Properties of Infinite Lists
A Module of Reactive Animations
FAL by Example
Basic Reactivity
Event Choice
Recursive Event Processing
Events with Data
Snapshot
Boolean Events
Integration
Implementing FAL
An Implementation Strategy
Incremental Sampling
Final Refinements
Representing Events
The Implementation
Behaviors
Events
An Example
Extensions
Variations on switch
Mouse Motion
Paddleball in Twenty Lines
Communicating With the Outside World
Files, Channels, and Handles
Why Use Handles?
Channels
Exception Handling
First-Class Channels and Concurrency
Rendering Reactive Animations
Preliminaries
Reactimate
Window User
Higher-Order Types
The Functor Class
The Monad Class
Other Instances of Monad
Other Monadic Operations
The MonadPlus Class
State Monads
Type Class Type Errors
An Imperative Robot Language
IRL by Example
Robot is a State Monad
The Implementation of IRL Commands
Robot Orientation
Using the Pen
Playing With Coins
Logic and Control
All the World is a Grid
Robot Graphics
Putting it all Together
Functional Music Composition
The Music Data Type
Higher-Level Constructions
Lines and Chords
Delay and Repeat
Polyrhythms
Determining Duration
Reversing Musical Structure
Truncating Parallel Composition
Trills
Percussion
A Couple of Final Examples
Cascades
Self-Similar (Fractal) Music
Interpreting Functional Music
Interpreting Music: A Performance
An Algebra of Music
From Performance to MIDI
An Introduction to MIDI
The Conversion Process
Putting It All Together
A Tour of the PreludeList Module
The PreludeList Module
Simple List Selector Functions
Index-Based Selector Functions
Predicate-Based Selector Functions
Fold-like Functions
List Generators
String-Based Functions
Boolean List Functions
List Membership Functions
Arithmetic on Lists
List Combining Functions
A Tour of Haskell's Standard Type Classes
The Ordered Class
The Enumeration Class
The Bounded Class
The Show Class
The Read Class
The Index Class
The Numeric Classes
Built-in Types Are Not Special
Pattern-Matching Details
Bibliography
Index

Caractéristiques techniques

  PAPIER
Éditeur(s) Cambridge University Press
Auteur(s) Paul Hudak
Parution 10/01/2000
EAN13 9780521644082

Avantages Eyrolles.com

Livraison à partir de 0,01 en France métropolitaine
Paiement en ligne SÉCURISÉ
Livraison dans le monde
Retour sous 15 jours
+ d'un million et demi de livres disponibles
satisfait ou remboursé
Satisfait ou remboursé
Paiement sécurisé
modes de paiement
Paiement à l'expédition
partout dans le monde
Livraison partout dans le monde
Service clients sav@commande.eyrolles.com
librairie française
Librairie française depuis 1925
Recevez nos newsletters
Vous serez régulièrement informé(e) de toutes nos actualités.
Inscription