|
5.1 From Tables to Lists
|
|
5.1.1 Basic Statistical Questions
|
|
5.1.2 Extracting a Column from a Table
|
|
5.1.3 Understanding Lists
|
|
5.1.3.1 Lists as Anonymous Data
|
|
5.1.3.2 Creating Literal Lists
|
|
5.1.4 Operating on Lists
|
|
5.1.4.1 Built-In Operations on Lists of Numbers
|
|
5.1.4.2 Built-In Operations on Lists in General
|
|
5.1.4.3 An Aside on Naming Conventions
|
|
5.1.4.4 Getting Elements By Position
|
|
5.1.4.5 Transforming Lists
|
|
5.1.4.6 Recap: Summary of List Operations
|
|
5.1.5 Lambda: Anonymous Functions
|
|
5.1.6 Combining Lists and Tables
|
|
5.2 Processing Lists
|
|
5.2.1 Making Lists and Taking Them Apart
|
|
5.2.2 Some Example Exercises
|
|
5.2.3 Structural Problems with Scalar Answers
|
|
5.2.3.1 my-len: Examples
|
|
5.2.3.2 my-sum: Examples
|
|
5.2.3.3 From Examples to Code
|
|
5.2.4 Structural Problems that Transform Lists
|
|
5.2.4.1 my-doubles: Examples and Code
|
|
5.2.4.2 my-str-len: Examples and Code
|
|
5.2.5 Structural Problems that Select from Lists
|
|
5.2.5.1 my-pos-nums: Examples and Code
|
|
5.2.5.2 my-alternating:
Examples and Code
|
|
5.2.6 Structural Problems Over Relaxed Domains
|
|
5.2.6.1 my-max: Examples
|
|
5.2.6.2 my-max: From Examples to Code
|
|
5.2.7 More Structural Problems with Scalar Answers
|
|
5.2.7.1 my-avg: Examples
|
|
5.2.8 Structural Problems with Accumulators
|
|
5.2.8.1 my-running-sum: First Attempt
|
|
5.2.8.2 my-running-sum: Examples and Code
|
|
5.2.8.3 my-alternating: Examples and Code
|
|
5.2.9 Dealing with Multiple Answers
|
|
5.2.9.1 uniq: Problem Setup
|
|
5.2.9.2 uniq: Examples
|
|
5.2.9.3 uniq: Code
|
|
5.2.9.4 uniq: Reducing Computation
|
|
5.2.9.5 uniq: Example and Code Variations
|
|
5.2.9.6 uniq: Why Produce a List?
|
|
5.2.10 Monomorphic Lists and Polymorphic Types
|
|
5.3 Recursive Data
|
|
5.3.1 Functions to Process Recursive Data
|
|
5.3.2 A Template for Processing Recursive Data
|
|
5.3.3 The Design Recipe
|