|
1 An Introduction to Functional Programming Languages |
|
|
1 | (6) |
|
1.1 Main Characteristics of Functional Programming Languages |
|
|
2 | (1) |
|
1.2 Some Functional Programming Languages |
|
|
3 | (1) |
|
|
3 | (1) |
|
|
3 | (1) |
|
|
4 | (1) |
|
|
4 | (1) |
|
|
4 | (1) |
|
|
4 | (3) |
|
2 The Basics of the Language |
|
|
7 | (30) |
|
|
7 | (4) |
|
|
9 | (2) |
|
2.2 Statements and Expressions |
|
|
11 | (1) |
|
2.3 Statement Separator and Blocks |
|
|
11 | (1) |
|
|
12 | (1) |
|
|
12 | (1) |
|
2.5.1 Composite Types: Cartesian Products |
|
|
13 | (1) |
|
2.5.2 Nested Declarations |
|
|
13 | (1) |
|
|
13 | (9) |
|
2.6.1 Alternative Ways to Define Types in Functions |
|
|
15 | (1) |
|
2.6.2 Type Inference in Scala |
|
|
15 | (1) |
|
|
16 | (1) |
|
2.6.4 Referentially Transparent |
|
|
17 | (1) |
|
2.6.5 Higher-Order Functions |
|
|
18 | (1) |
|
|
19 | (1) |
|
2.6.7 Recursive Functions |
|
|
20 | (2) |
|
2.6.8 Functions and Non Functional Programming |
|
|
22 | (1) |
|
|
22 | (4) |
|
|
24 | (2) |
|
|
26 | (3) |
|
2.8.1 Pattern Matching on Lists |
|
|
27 | (2) |
|
2.9 Collections and Their Higher Order Functions |
|
|
29 | (7) |
|
2.9.1 Mutable and Immutable Data Structures |
|
|
29 | (1) |
|
2.9.2 Mutable and Immutable Collections |
|
|
30 | (1) |
|
2.9.3 Some Imperative Construction on Collections |
|
|
31 | (1) |
|
2.9.4 Higher-Order Functions for Collections |
|
|
32 | (4) |
|
|
36 | (1) |
|
3 Lazy and Eager Evaluation |
|
|
37 | (14) |
|
|
39 | (1) |
|
|
40 | (1) |
|
3.3 Streams and Other Infinite Data Structures |
|
|
41 | (3) |
|
3.4 Stream of Even Numbers |
|
|
44 | (1) |
|
3.5 Stream of Odd Numbers |
|
|
45 | (1) |
|
3.6 The Fibonacci Numbers |
|
|
46 | (1) |
|
|
46 | (1) |
|
3.8 Exercises with Streams |
|
|
47 | (4) |
|
4 Object-Oriented Programming in Scala |
|
|
51 | (18) |
|
|
53 | (1) |
|
4.2 Definition of a Class |
|
|
54 | (4) |
|
|
57 | (1) |
|
|
58 | (1) |
|
|
59 | (1) |
|
|
59 | (1) |
|
|
60 | (1) |
|
|
61 | (2) |
|
|
63 | (3) |
|
|
63 | (1) |
|
4.8.2 Multiple Inheritance |
|
|
64 | (1) |
|
4.8.3 Name Clashes in Traits |
|
|
65 | (1) |
|
|
66 | (1) |
|
4.10 Some Additional Issues |
|
|
67 | (2) |
|
5 Types and Classes Revisited: Polymorphism |
|
|
69 | (8) |
|
5.1 Classes with Polymorphic Types |
|
|
70 | (2) |
|
5.2 Monoids, Functors, and Monads |
|
|
72 | (5) |
|
|
73 | (1) |
|
|
73 | (1) |
|
|
74 | (3) |
|
|
77 | (10) |
|
6.1 Tail-Recursive Functions |
|
|
77 | (4) |
|
6.1.1 Some Scala Technicalities |
|
|
79 | (1) |
|
6.1.2 Additional Examples of Tail-Recursive Functions |
|
|
80 | (1) |
|
6.2 Functions in Scala and Object-Oriented Programming |
|
|
81 | (2) |
|
6.3 Defining Functions Revisited: val and def |
|
|
83 | (1) |
|
6.4 Data Types and Efficiency |
|
|
84 | (3) |
|
|
87 | (6) |
|
7.1 Definition of Algebraic Data Types in Standard ML |
|
|
87 | (3) |
|
7.2 Algebraic Data Types in Scala |
|
|
90 | (2) |
|
7.3 Data Types and Efficiency Revisited |
|
|
92 | (1) |
|
|
93 | (18) |
|
|
94 | (3) |
|
|
97 | (14) |
|
|
98 | (5) |
|
8.2.2 Receive and React, ! and !? |
|
|
103 | (2) |
|
|
105 | (2) |
|
|
107 | (1) |
|
|
107 | (4) |
|
|
111 | (10) |
|
|
119 | (2) |
Index |
|
121 | |