Foreword |
|
xix | |
Preface |
|
xxi | |
Acknowledgments |
|
xxiii | |
|
|
xxv | |
|
|
xxxi | |
Acronyms |
|
xxxiii | |
|
|
1 | (36) |
|
|
2 | (1) |
|
|
2 | (1) |
|
|
3 | (1) |
|
|
3 | (26) |
|
|
4 | (11) |
|
|
15 | (9) |
|
|
24 | (2) |
|
|
26 | (1) |
|
|
27 | (2) |
|
|
29 | (2) |
|
|
31 | (6) |
|
|
31 | (1) |
|
|
32 | (1) |
|
|
33 | (2) |
|
|
35 | (2) |
|
|
37 | (26) |
|
|
38 | (1) |
|
|
38 | (4) |
|
Factoring out common subexpressions |
|
|
39 | (1) |
|
Factoring out higher-order functions |
|
|
39 | (3) |
|
|
42 | (2) |
|
|
44 | (5) |
|
|
44 | (2) |
|
|
46 | (3) |
|
Functional design patterns |
|
|
49 | (4) |
|
|
49 | (3) |
|
|
52 | (1) |
|
|
53 | (10) |
|
|
54 | (1) |
|
|
54 | (2) |
|
|
56 | (1) |
|
|
56 | (2) |
|
|
58 | (5) |
|
|
63 | (50) |
|
|
64 | (5) |
|
|
64 | (1) |
|
|
65 | (4) |
|
|
69 | (6) |
|
|
69 | (1) |
|
|
70 | (1) |
|
|
70 | (1) |
|
|
71 | (1) |
|
|
72 | (1) |
|
|
72 | (1) |
|
|
72 | (1) |
|
|
73 | (1) |
|
|
73 | (2) |
|
|
75 | (1) |
|
|
75 | (1) |
|
|
75 | (7) |
|
|
76 | (1) |
|
|
76 | (2) |
|
|
78 | (1) |
|
|
78 | (2) |
|
|
80 | (2) |
|
|
82 | (2) |
|
|
82 | (1) |
|
|
83 | (1) |
|
|
83 | (1) |
|
|
83 | (1) |
|
|
84 | (1) |
|
|
84 | (3) |
|
|
85 | (1) |
|
|
86 | (1) |
|
Insertion, replacement and removal |
|
|
86 | (1) |
|
|
87 | (1) |
|
|
87 | (4) |
|
|
88 | (1) |
|
|
89 | (1) |
|
|
90 | (1) |
|
Choosing a data structure |
|
|
91 | (1) |
|
|
92 | (1) |
|
|
92 | (1) |
|
|
93 | (20) |
|
|
100 | (1) |
|
|
101 | (9) |
|
|
110 | (3) |
|
|
113 | (14) |
|
|
113 | (4) |
|
Machine-precision integers |
|
|
113 | (1) |
|
Machine-precision floating-point numbers |
|
|
114 | (3) |
|
|
117 | (2) |
|
|
119 | (1) |
|
|
120 | (2) |
|
|
122 | (1) |
|
Other forms of arithmetic |
|
|
123 | (4) |
|
Arbitrary-precision integer arithmetic |
|
|
123 | (1) |
|
Arbitrary-precision rational arithmetic |
|
|
124 | (1) |
|
|
125 | (2) |
|
|
127 | (14) |
|
|
127 | (2) |
|
|
128 | (1) |
|
|
129 | (1) |
|
Reading from and writing to files |
|
|
130 | (1) |
|
|
131 | (1) |
|
|
132 | (9) |
|
|
133 | (4) |
|
|
137 | (4) |
|
|
141 | (32) |
|
|
141 | (6) |
|
|
142 | (1) |
|
|
142 | (1) |
|
|
142 | (1) |
|
|
143 | (4) |
|
|
147 | (1) |
|
|
147 | (10) |
|
|
147 | (1) |
|
|
148 | (1) |
|
|
148 | (1) |
|
|
149 | (2) |
|
|
151 | (1) |
|
|
151 | (1) |
|
|
152 | (2) |
|
|
154 | (1) |
|
Discrete wavelet transform |
|
|
155 | (2) |
|
|
157 | (2) |
|
|
157 | (1) |
|
|
158 | (1) |
|
|
159 | (9) |
|
|
159 | (1) |
|
|
160 | (1) |
|
|
160 | (1) |
|
|
161 | (1) |
|
|
161 | (1) |
|
|
162 | (1) |
|
|
163 | (1) |
|
|
163 | (1) |
|
|
163 | (1) |
|
|
164 | (1) |
|
|
165 | (1) |
|
|
165 | (1) |
|
|
166 | (1) |
|
|
167 | (1) |
|
|
167 | (1) |
|
|
168 | (1) |
|
|
168 | (1) |
|
|
168 | (1) |
|
|
169 | (1) |
|
|
169 | (1) |
|
|
169 | (4) |
|
|
170 | (1) |
|
|
170 | (3) |
|
|
173 | (26) |
|
|
174 | (6) |
|
|
174 | (1) |
|
|
175 | (1) |
|
|
175 | (1) |
|
|
176 | (1) |
|
Example: Cellular automata |
|
|
177 | (2) |
|
|
179 | (1) |
|
|
180 | (14) |
|
|
180 | (3) |
|
|
183 | (5) |
|
|
188 | (3) |
|
|
191 | (1) |
|
Spawning visualizations from the F# interactive mode |
|
|
192 | (2) |
|
Tesselating objects into triangles |
|
|
194 | (5) |
|
|
194 | (2) |
|
|
196 | (3) |
|
|
199 | (26) |
|
|
200 | (2) |
|
|
200 | (1) |
|
|
201 | (1) |
|
|
201 | (1) |
|
|
202 | (1) |
|
|
202 | (3) |
|
|
202 | (3) |
|
Algorithmic optimizations |
|
|
205 | (1) |
|
Lower-level optimizations |
|
|
206 | (19) |
|
Benchmarking data structures |
|
|
207 | (4) |
|
|
211 | (1) |
|
|
212 | (1) |
|
|
213 | (4) |
|
|
217 | (3) |
|
Avoiding higher-order functions |
|
|
220 | (1) |
|
|
220 | (1) |
|
|
221 | (1) |
|
|
222 | (1) |
|
Eliminate needless closures |
|
|
223 | (1) |
|
|
224 | (1) |
|
|
224 | (1) |
|
|
225 | (24) |
|
|
226 | (1) |
|
|
226 | (1) |
|
|
227 | (7) |
|
|
228 | (1) |
|
|
229 | (2) |
|
|
231 | (1) |
|
|
232 | (1) |
|
|
233 | (1) |
|
|
233 | (1) |
|
|
234 | (1) |
|
|
234 | (1) |
|
|
235 | (1) |
|
|
236 | (1) |
|
|
237 | (1) |
|
|
237 | (2) |
|
|
237 | (1) |
|
|
238 | (1) |
|
Declarative representation |
|
|
238 | (1) |
|
|
239 | (1) |
|
|
240 | (5) |
|
|
240 | (2) |
|
|
242 | (1) |
|
Pretty printing complex numbers |
|
|
243 | (1) |
|
|
244 | (1) |
|
|
245 | (4) |
|
|
245 | (2) |
|
|
247 | (2) |
|
|
249 | (18) |
|
|
250 | (4) |
|
|
250 | (1) |
|
Pretty printing XML in F# interactive sessions |
|
|
251 | (1) |
|
Deconstructing XML using active patterns |
|
|
251 | (2) |
|
|
253 | (1) |
|
|
254 | (4) |
|
US temperature by zip code |
|
|
255 | (1) |
|
|
256 | (2) |
|
|
258 | (9) |
|
|
259 | (1) |
|
|
259 | (2) |
|
Evaluating SQL expressions |
|
|
261 | (1) |
|
Interrogating the database programmatically |
|
|
261 | (2) |
|
Filling the database from a data structure |
|
|
263 | (1) |
|
|
263 | (1) |
|
|
264 | (3) |
|
|
267 | (14) |
|
|
267 | (5) |
|
Referencing the Excel interface |
|
|
268 | (1) |
|
Loading an existing spreadsheet |
|
|
268 | (1) |
|
Creating a new spreadsheet |
|
|
269 | (1) |
|
|
269 | (1) |
|
Writing cell values into a worksheet |
|
|
270 | (1) |
|
Reading cell values from a worksheet |
|
|
271 | (1) |
|
|
272 | (3) |
|
Creating a .NET interface from a COM interface |
|
|
272 | (1) |
|
|
273 | (1) |
|
Remote execution of MATLAB commands |
|
|
273 | (1) |
|
Reading and writing MATLAB variables |
|
|
273 | (2) |
|
|
275 | (6) |
|
|
275 | (2) |
|
|
277 | (4) |
|
|
281 | (30) |
|
|
281 | (7) |
|
Discrete Fourier transform |
|
|
282 | (1) |
|
Danielson-Lanczos algorithm |
|
|
283 | (2) |
|
Bluestein's convolution algorithm |
|
|
285 | (2) |
|
|
287 | (1) |
|
|
288 | (3) |
|
|
289 | (1) |
|
Injecting results into Excel |
|
|
290 | (1) |
|
|
291 | (1) |
|
Finding nth-nearest neighbors |
|
|
291 | (10) |
|
|
292 | (3) |
|
Representing an atomic configuration |
|
|
295 | (1) |
|
|
295 | (2) |
|
|
297 | (1) |
|
|
297 | (2) |
|
|
299 | (2) |
|
|
301 | (2) |
|
Real-time particle dynamics |
|
|
303 | (8) |
|
Appendix A: Troubleshooting |
|
|
311 | (6) |
|
|
311 | (1) |
|
A.2 Mutable array contents |
|
|
312 | (1) |
|
|
313 | (1) |
|
|
313 | (1) |
|
A.5 Local and non-local variable definitions |
|
|
313 | (1) |
|
|
314 | (1) |
|
A.7 Applications that do not die |
|
|
314 | (1) |
|
|
315 | (2) |
Glossary |
|
317 | (8) |
Bibliography |
|
325 | (4) |
Index |
|
329 | |