Programming in Haskell (1st Edition)
დამატებითი ინფორმაცია
- ISBN: 9780521692694
- ფიზიკური აღწერილობა: 184 p.
- გამომცემლობა: UK Cambridge University Press 2007
ხელმისაწვდომი ასლები
- 1 of 1 copy available at შზსუ-ს ბიბლიოთეკები.
დაჯავშნა
- 0 current holds with 1 total copy.
Show Only Available Copies
მდებარეობა | ინვენტარის ნომერი / ასლის შენიშვნები | შტრიხკოდი | თაროზე განთავსების ადგილი | სტატუსი | დასაბრუნებელია |
---|---|---|---|---|---|
მთავარი ბიბლიოთეკა | IBSU 005.133 H-95 064 | IBSU024103064 | Stacks | Available | - |
Preface | xi | |
Chapter 1. | Introduction | 1 |
1.1. | Functions | 1 |
1.2. | Functional programming | 2 |
1.3. | Features of Haskell | 4 |
1.4. | Historical background | 6 |
1.5. | A taste of Haskell | 6 |
1.6. | Chapter remarks | 9 |
1.7. | Exercises | 9 |
Chapter 2. | First steps | 10 |
2.1. | The Hugs system | 10 |
2.2. | The standard prelude | 10 |
2.3. | Function application | 12 |
2.4. | Haskell scripts | 13 |
2.5. | Chapter remarks | 16 |
2.6. | Exercises | 16 |
Chapter 3. | Types and classes | 17 |
3.1. | Basic concepts | 17 |
3.2. | Basic types | 18 |
3.3. | List types | 20 |
3.4. | Tuple types | 20 |
3.5. | Function types | 21 |
3.6. | Curried functions | 21 |
3.7. | Polymorphic types | 23 |
3.8. | Overloaded types | 23 |
3.9. | Basic classes | 24 |
3.10. | Chapter remarks | 28 |
3.11. | Exercises | 28 |
Chapter 4. | Defining functions | 30 |
4.1. | New from old | 30 |
4.2. | Conditional expressions | 31 |
4.3. | Guarded equations | 31 |
4.4. | Pattern matching | 32 |
4.5. | Lambda expressions | 34 |
4.6. | Sections | 36 |
4.7. | Chapter remarks | 36 |
4.8. | Exercises | 37 |
Chapter 5. | List comprehensions | 38 |
5.1. | Generators | 38 |
5.2. | Guards | 39 |
5.3. | The zip function | 40 |
5.4. | String comprehensions | 41 |
5.5. | The Caesar cipher | 42 |
5.6. | Chapter remarks | 46 |
5.7. | Exercises | 46 |
Chapter 6. | Recursive functions | 48 |
6.1. | Basic concepts | 48 |
6.2. | Recursion on lists | 49 |
6.3. | Multiple arguments | 52 |
6.4. | Multiple recursion | 53 |
6.5. | Mutual recursion | 53 |
6.6. | Advice on recursion | 55 |
6.7. | Chapter remarks | 59 |
6.8. | Exercises | 59 |
Chapter 7. | Higher-order functions | 61 |
7.1. | Basic concepts | 61 |
7.2. | Processing lists | 62 |
7.3. | The foldr function | 64 |
7.4. | The foldl function | 66 |
7.5. | The composition operator | 68 |
7.6. | String transmitter | 69 |
7.7. | Chapter remarks | 72 |
7.8. | Exercises | 72 |
Chapter 8. | Functional parsers | 74 |
8.1. | Parsers | 74 |
8.2. | The parser type | 75 |
8.3. | Basic parsers | 75 |
8.4. | Sequencing | 76 |
8.5. | Choice | 78 |
8.6. | Derived primitives | 78 |
8.7. | Handling spacing | 81 |
8.8. | Arithmetic expressions | 82 |
8.9. | Chapter remarks | 85 |
8.10. | Exercises | 85 |
Chapter 9. | Interactive programs | 87 |
9.1. | Interaction | 87 |
9.2. | The input/output type | 88 |
9.3. | Basic actions | 88 |
9.4. | Sequencing | 89 |
9.5. | Derived primitives | 90 |
9.6. | Calculator | 91 |
9.7. | Game of life | 94 |
9.8. | Chapter remarks | 97 |
9.9. | Exercises | 97 |
Chapter 10. | Declaring types and classes | 99 |
10.1. | Type declarations | 99 |
10.2. | Data declarations | 100 |
10.3. | Recursive types | 102 |
10.4. | Tautology checker | 105 |
10.5. | Abstract machine | 109 |
10.6. | Class and instance declarations | 111 |
10.7. | Chapter remarks | 114 |
10.8. | Exercises | 114 |
Chapter 11. | The countdown problem | 116 |
11.1. | Introduction | 116 |
11.2. | Formalising the problem | 117 |
11.3. | Brute force solution | 119 |
11.4. | Combining generation and evaluation | 120 |
11.5. | Exploiting algebraic properties | 121 |
11.6. | Chapter remarks | 123 |
11.7. | Exercises | 123 |
Chapter 12. | Lazy evaluation | 124 |
12.1. | Introduction | 124 |
12.2. | Evaluation strategies | 125 |
12.3. | Termination | 128 |
12.4. | Number of reductions | 129 |
12.5. | Infinite structures | 130 |
12.6. | Modular programming | 132 |
12.7. | Strict application | 134 |
12.8. | Chapter remarks | 137 |
12.9. | Exercises | 137 |
Chapter 13. | Reasoning about programs | 139 |
13.1. | Equational reasoning | 139 |
13.2. | Reasoning about Haskell | 140 |
13.3. | Simple examples | 141 |
13.4. | Induction on numbers | 142 |
13.5. | Induction on lists | 145 |
13.6. | Making append vanish | 146 |
13.7. | Compiler correctness | 150 |
13.8. | Chapter remarks | 154 |
13.9. | Exercises | 154 |
Appendix A. | Standard prelude | 156 |
A.1. | Classes | 156 |
A.2. | Logical values | 157 |
A.3. | Characters and strings | 158 |
A.4. | Numbers | 159 |
A.5. | Tuples | 160 |
A.6. | Maybe | 160 |
A.7. | Lists | 160 |
A.8. | Functions | 164 |
A.9. | Input/output | 164 |
Appendix B. | Symbol table | 166 |
Bibliography | 167 | |
Index | 169 |