All rights reserved except as licensed pursuant to the Creative Commons license identified above. Any reproduction or other use not licensed as above, by any electronic or mechanical means (including but not limited to photocopying, public distribution, online display, and digital information storage and retrieval) requires permission in writing from the publisher.
This book was set in Scribble and LaTeX by the authors.
Names: Felleisen, Matthias.
Title: How to design programs: an introduction to programming and computing / Matthias Felleisen, Robert Bruce Findler, Matthew Flatt, and Shriram Krishnamurthi.
Description: Second edition. | Cambridge, MA: The MIT Press, [2017] | Revised edition of: How to design programs / Matthias Felleisen [et al.]. 2001. | Includes bibliographical references and index.
Identifiers: LCCN 2017018384 | ISBN 9780262534802 (pbk.: alk. paper)
Subjects: LCSH: Computer programming. | Electronic data processing.
Contents
List of Figures
: The basic steps of a function design recipe
: The dependencies among parts and intermezzos
: Meet DrRacket
: Landing a rocket (version 1)
: Landing a rocket (version 2)
: Landing a rocket (version 3)
: Landing a rocket (version 4)
: Landing a rocket (version 5)
: Landing a rocket (version 6)
: Laws of image creation
: The DrRacket stepper
: A batch program
: How big-bang works
: A first interactive program
: From information to data, and back
: The completion of design step 5
: Testing in BSL
: The wish list for designing world programs
: Examples for a moving car program
: Recall from One Program, Many Definitions
: Conditional functions and special enumerations
: UFO, descending
: Rendering with a status line
: Rendering with a status line, revised
: Launching a countdown and a liftoff
: How a traffic light functions
: A symbolic traffic light
: A transition diagram for a door with an automatic closer
: A Cartesian point
: The universe of data
: Adding structure to a universe
: Rendering space invader game states, by example
: The complete rendering function
: Rendering game states again
: Rendering the space invader games, with tanks
: Two ways of writing a data definition for FSMs
: A finite state machine as a diagram
: The universe of BSL data
: BSL core vocabulary
: BSL core grammar
: Syntactic naming conventions
: Replacing equals by equals
: BSL, full grammar
: Building a list
: Drawing a list
: List primitives
: Searching a list
: Computing with lists, step 1
: Computing with lists, step 2
: Computing with lists, step 3
: Arrows for self-references in data definitions and templates
: How to translate a data definition into a template
: How to turn a template into a function definition
: Turning a template into a function, the table method
: Tabulating arguments, intermediate values, and results
: Designing a function for self-referential data
: A table for
: A table for sorted>?
: Creating a list of copies
: Random attacks
: A list-based world program
: Two data representations for sets
: Functions for the two data representations of sets
: Computing the wages of all employees
: Computing the wages from work records
: Things take time
: Reading files
: Counting the words on a line
: Encoding strings
: Transpose a matrix
: Tabulating for
: Sorting lists of numbers
: Drawing a polygon
: Reading a dictionary
: Representing iTunes tracks as structures (the structures)
: Representing iTunes tracks as structures (the functions)
: Representing iTunes tracks as lists
: Finding alternative words
: Playing Worm
: Random placement of food
: Simple Tetris
: Representing and interpreting finite state machines in general
: A simplistic HTML generator
: A data representation based on nested lists
: A web page generated with BSL+
: Two similar functions
: Two similar functions, revisited
: Two more similar functions
: Finding the and in a list of numbers
: A pair of similar functions
: The same two similar functions, abstracted
: The similar functions for exercise 250
: The similar functions for exercise 251
: The similar functions for exercise 252
: ISLs abstract functions for list processing (1)
: ISLs abstract functions for list processing (2)
: Creating a program with abstractions
: Organizing a function with local
: Organizing interconnected function definitions with local
: Using local may improve performance
: A function on inventories, see exercise 261
: Power from local function definitions
: A general sorting function
: A curried predicate for checking the ordering of a list
: Drawing lexical scope contours for exercise 301
: Drawing lexical scope contours for exercise 301 (version 2)
: ISL+ extended with loops
: A compact definition of arrangements with for*/list
: Constructing sequences of natural numbers
: ISL+ match expressions
: A family tree
: A data representation of the sample family tree
: Finding a blue-eyed child in an ancestor tree
: Calculating with trees
: Finding a blue-eyed child in a family forest
: A template for S-expressions
: A program for S-expressions
: Arrows for nests of data definitions and templates
: A binary search tree and a binary tree
: A program to be simplified
: Program simplification, step 1
: Program simplification, steps 2 and 3
: A sample directory tree
: Representing BSL expressions in BSL
: From S-expr to BSL-expr
: The complete definition of xexpr-attr
: A realistic data representation of XML enumerations
: Refining functions to match refinements of data definitions
: Finite state machines, revisited
: Interpreting a DSL program
: A file with a machine configuration
: Reading X-expressions
: Web data as an event
: Indexing into a list
: Indexing into a list, simplified
: A simple hangman game
: Databases as tables
: Databases as ISL+ data
: The result of systematic expression hoisting
: A template for project
: Database projection
: Database projection
: Functions for inexact representations
: A Janus-faced series of inexact numbers
: The graph of oscillate
: Useless templates for breaking up strings into chunks
: Generative recursion
: A graphical illustration of the quick-sort algorithm
: The quick-sort algorithm
: The table-based guessing approach for combining solutions