About the Authors |
|
xx | |
About the Technical Reviewer |
|
xxi | |
Acknowledgments |
|
xxii | |
|
|
1 | (6) |
|
|
2 | (1) |
|
|
2 | (3) |
|
|
5 | (2) |
|
Chapter 2 Your First F# Program - Getting Started With F# |
|
|
7 | (18) |
|
Creating Your First F# Program |
|
|
7 | (2) |
|
|
9 | (1) |
|
|
9 | (1) |
|
|
10 | (1) |
|
|
11 | (1) |
|
|
11 | (1) |
|
|
12 | (2) |
|
|
14 | (1) |
|
Using Properties and the Dot-Notation |
|
|
14 | (1) |
|
|
15 | (2) |
|
|
17 | (1) |
|
Using Object-Oriented Libraries from F# |
|
|
18 | (1) |
|
Using open to Access Namespaces and Modules |
|
|
19 | (1) |
|
Using new and Setting Properties |
|
|
20 | (2) |
|
|
22 | (3) |
|
|
23 | (2) |
|
Chapter 3 Introducing Functional Programming |
|
|
25 | (24) |
|
Starting with Numbers and Strings |
|
|
25 | (1) |
|
Some Simple Types and Literals |
|
|
25 | (1) |
|
|
26 | (1) |
|
|
27 | (1) |
|
|
27 | (1) |
|
Working with Conditionals: && and II |
|
|
28 | (1) |
|
Defining Recursive Functions |
|
|
28 | (2) |
|
|
30 | (3) |
|
|
33 | (1) |
|
Getting Started with Pattern Matching |
|
|
34 | (1) |
|
Matching on Structured Values |
|
|
35 | (1) |
|
Guarding Rules and Combining Patterns |
|
|
36 | (1) |
|
Further Ways of Forming Patterns |
|
|
37 | (1) |
|
Introducing Function Values |
|
|
37 | (2) |
|
Using Anonymous Function Values |
|
|
39 | (1) |
|
Computing with Aggregate Operators |
|
|
39 | (2) |
|
Composing Functions with >> |
|
|
41 | (1) |
|
Building Functions with Partial Application |
|
|
42 | (1) |
|
|
42 | (2) |
|
Iterating with Aggregate Operators |
|
|
44 | (1) |
|
Abstracting Control with Functions |
|
|
44 | (1) |
|
Using Object Methods as First-Class Functions |
|
|
45 | (1) |
|
Some Common Uses of Function Values |
|
|
45 | (4) |
|
|
47 | (2) |
|
Chapter 4 Introducing Imperative Programming |
|
|
49 | (32) |
|
About Functional and Imperative Programming |
|
|
49 | (1) |
|
Imperative Looping and Iterating |
|
|
50 | (1) |
|
|
50 | (1) |
|
|
51 | (1) |
|
More Iteration Loops over Sequences |
|
|
51 | (1) |
|
|
52 | (1) |
|
|
53 | (1) |
|
|
54 | (1) |
|
|
55 | (1) |
|
|
56 | (1) |
|
|
56 | (2) |
|
Generating and Slicing Arrays |
|
|
58 | (1) |
|
|
59 | (1) |
|
Introducing the Imperative .NET Collections |
|
|
59 | (1) |
|
|
59 | (1) |
|
|
60 | (1) |
|
Using Dictionary's TryGetValue |
|
|
61 | (1) |
|
Using Dictionaries with Compound Keys |
|
|
62 | (1) |
|
Some Other Mutable Data Structures |
|
|
62 | (1) |
|
Exceptions and Controlling Them |
|
|
63 | (1) |
|
|
64 | (1) |
|
|
65 | (1) |
|
Defining New Exception Types |
|
|
65 | (1) |
|
Having an Effect: Basic I/O |
|
|
66 | (1) |
|
|
67 | (1) |
|
Some Other I/O-Related Types |
|
|
68 | (1) |
|
|
69 | (1) |
|
Combining Functional and Imperative: Efficient Precomputation and Caching |
|
|
69 | (1) |
|
Precomputation and Partial Application |
|
|
69 | (1) |
|
Precomputation and Objects |
|
|
70 | (1) |
|
|
71 | (3) |
|
|
74 | (1) |
|
Other Variations on Caching and Memoization |
|
|
75 | (1) |
|
Combining Functional and Imperative: Functional Programming with Side Effects |
|
|
75 | (1) |
|
Consider Replacing Mutable Locals and Loops with Recursion |
|
|
76 | (1) |
|
Separating Pure Computation from Side-Effecting Computations |
|
|
76 | (1) |
|
Separating Mutable Data Structures |
|
|
76 | (1) |
|
Not All Side Effects Are Equal |
|
|
77 | (1) |
|
Avoid Combining Imperative Programming and Laziness |
|
|
78 | (3) |
|
|
79 | (2) |
|
Chapter 5 Understanding Types in Functional Programming |
|
|
81 | (30) |
|
Exploring Some Simple Type Definitions |
|
|
81 | (1) |
|
Defining Type Abbreviations |
|
|
81 | (1) |
|
|
82 | (1) |
|
Handling Non-Unique Record Field Names |
|
|
83 | (1) |
|
|
84 | (1) |
|
Defining Discriminated Unions |
|
|
84 | (2) |
|
Using Discriminated Unions as Records |
|
|
86 | (1) |
|
Defining Multiple Types Simultaneously |
|
|
87 | (1) |
|
|
87 | (1) |
|
Writing Generic Functions |
|
|
88 | (1) |
|
Some Important Generic Functions |
|
|
89 | (5) |
|
|
94 | (1) |
|
Generic Algorithms through Explicit Arguments |
|
|
94 | (1) |
|
Generic Algorithms through Function Parameters |
|
|
95 | (2) |
|
Generic Algorithms through Inlining |
|
|
97 | (2) |
|
More on Different Kinds of Types |
|
|
99 | (1) |
|
Reference Types and Value Types |
|
|
99 | (1) |
|
Other Flavors of .NET Types |
|
|
100 | (1) |
|
|
100 | (1) |
|
|
101 | (1) |
|
|
101 | (1) |
|
Performing Type Tests via Pattern Matching |
|
|
102 | (1) |
|
Knowing When Upcasts Are Applied Automatically |
|
|
102 | (2) |
|
|
104 | (1) |
|
Troubleshooting Type-Inference Problems |
|
|
104 | (1) |
|
Using a Visual Editing Environment |
|
|
105 | (1) |
|
|
105 | (1) |
|
Understanding the Value Restriction |
|
|
106 | (1) |
|
Working Around the Value Restriction |
|
|
107 | (2) |
|
Understanding Generic Overloaded Operators |
|
|
109 | (2) |
|
|
109 | (2) |
|
Chapter 6 Programming with Objects |
|
|
111 | (36) |
|
Getting Started with Objects and Members |
|
|
111 | (3) |
|
|
114 | (3) |
|
Adding Further Object Notation to Your Types |
|
|
117 | (1) |
|
Working with Indexer Properties |
|
|
118 | (1) |
|
Adding Overloaded Operators |
|
|
118 | (2) |
|
Using Named and Optional Arguments |
|
|
120 | (1) |
|
Adding Method Overloading |
|
|
121 | (1) |
|
Defining Object Types with Mutable State |
|
|
122 | (2) |
|
Using Optional Property Settings |
|
|
124 | (1) |
|
Declaring Auto-Properties |
|
|
125 | (1) |
|
Getting Started with Object Interface Types |
|
|
126 | (1) |
|
Defining New Object Interface Types |
|
|
127 | (1) |
|
Implementing Object Interface Types Using Object Expressions |
|
|
127 | (2) |
|
Implementing Object Interface Types Using Concrete Types |
|
|
129 | (1) |
|
Using Common Object Interface Types from the .NET Libraries |
|
|
129 | (1) |
|
Understanding Hierarchies of Object Interface Types |
|
|
130 | (1) |
|
More Techniques to Implement Objects |
|
|
131 | (1) |
|
Combining Object Expressions and Function Parameters |
|
|
131 | (2) |
|
Defining Partially Implemented Class Types |
|
|
133 | (1) |
|
Using Partially Implemented Types via Delegation |
|
|
133 | (1) |
|
Using Partially Implemented Types via Implementation Inheritance |
|
|
134 | (1) |
|
Combining Functional and Objects: Cleaning Up Resources |
|
|
135 | (1) |
|
Resources and IDisposable |
|
|
136 | (2) |
|
Managing Resources with More Complex Lifetimes |
|
|
138 | (1) |
|
Cleaning Up Internal Objects |
|
|
139 | (1) |
|
Cleaning Up Unmanaged Objects |
|
|
140 | (1) |
|
Extending Existing Types and Modules |
|
|
141 | (2) |
|
Working with F# Objects and .NET Types |
|
|
143 | (1) |
|
|
144 | (1) |
|
|
144 | (1) |
|
|
145 | (1) |
|
|
145 | (2) |
|
|
146 | (1) |
|
Chapter 7 Encapsulating and Organizing Your Code |
|
|
147 | (16) |
|
|
147 | (1) |
|
Hiding Things with Local Definitions |
|
|
148 | (2) |
|
Hiding Things with Accessibility Annotations |
|
|
150 | (2) |
|
Organizing Code with Namespaces and Modules |
|
|
152 | (1) |
|
Putting Your Code in a Module |
|
|
153 | (1) |
|
Putting Your Modules and Types in Namespaces |
|
|
153 | (1) |
|
Hiding Things with Signatures |
|
|
154 | (2) |
|
Designing with Signatures |
|
|
156 | (1) |
|
When Are Signature Types Checked? |
|
|
156 | (1) |
|
Defining a Module with the Same Name as a Type |
|
|
156 | (1) |
|
Preventing Client Code from Opening a Module |
|
|
156 | (1) |
|
|
157 | (1) |
|
Automatically Opening Modules |
|
|
158 | (1) |
|
|
158 | (1) |
|
Using Files as Small Reusable Components |
|
|
159 | (1) |
|
Creating Assemblies, DLLs, and EXEs |
|
|
159 | (2) |
|
Creating and Sharing Packages |
|
|
161 | (2) |
|
|
162 | (1) |
|
Chapter 8 Working with Textual Data |
|
|
163 | (26) |
|
Building Strings and Formatting Data |
|
|
163 | (1) |
|
|
163 | (1) |
|
More about String Literals |
|
|
164 | (1) |
|
|
165 | (2) |
|
Generic Structural Formatting |
|
|
167 | (1) |
|
Formatting Strings Using .NET Formatting |
|
|
167 | (1) |
|
Parsing Strings and Textual Data |
|
|
168 | (1) |
|
|
168 | (1) |
|
Processing Line-Based Input |
|
|
169 | (1) |
|
Using Regular Expressions to Parse Lines |
|
|
170 | (1) |
|
More on Matching with System.Text.RegularExpressions |
|
|
171 | (4) |
|
Encoding and Decoding Unicode Strings |
|
|
175 | (1) |
|
Encoding and Decoding Binary Data |
|
|
176 | (1) |
|
Using XML as a Concrete Language Format |
|
|
176 | (1) |
|
Using the System.Xml Namespace |
|
|
176 | (2) |
|
From Concrete XML to Abstract Syntax |
|
|
178 | (2) |
|
Some Recursive Descent Parsing |
|
|
180 | (1) |
|
|
181 | (1) |
|
Recursive-Descent Parsing |
|
|
181 | (2) |
|
Binary Parsing and Formatting |
|
|
183 | (6) |
|
|
187 | (2) |
|
Chapter 9 Working with Sequences and Structured Data |
|
|
189 | (42) |
|
Getting Started with Sequences |
|
|
189 | (1) |
|
|
190 | (1) |
|
|
191 | (1) |
|
Transforming Sequences with Aggregate Operators |
|
|
191 | (1) |
|
Which Types Can Be Used as Sequences? |
|
|
192 | (1) |
|
Using Lazy Sequences from External Sources |
|
|
192 | (1) |
|
Using Sequence Expressions |
|
|
193 | (1) |
|
Enriching Sequence Expressions with Additional Logic |
|
|
194 | (1) |
|
Generating Lists and Arrays Using Sequence Expressions |
|
|
195 | (1) |
|
More on Working with Sequences |
|
|
196 | (1) |
|
Using Other Sequence Operators: Truncate and Sort |
|
|
197 | (1) |
|
Selecting Multiple Elements From Sequences |
|
|
198 | (1) |
|
Finding Elements and Indexes in Sequences |
|
|
199 | (1) |
|
Grouping and Indexing Sequences |
|
|
200 | (1) |
|
|
201 | (1) |
|
Cleaning Up in Sequence Expressions |
|
|
202 | (1) |
|
Expressing Some Operations Using Sequence Expressions |
|
|
203 | (1) |
|
Structure Beyond Sequences: Working with Trees |
|
|
203 | (1) |
|
Example: Abstract Syntax Representations |
|
|
204 | (1) |
|
Transforming Abstract Syntax Representations |
|
|
205 | (1) |
|
Using On-Demand Computation with Abstract Syntax Trees |
|
|
206 | (2) |
|
Caching Properties in Abstract Syntax Trees |
|
|
208 | (1) |
|
Memoizing Construction of Syntax Tree Nodes |
|
|
208 | (2) |
|
Active Patterns: Views for Structured Data |
|
|
210 | (1) |
|
Converting the Same Data to Many Views |
|
|
211 | (2) |
|
Matching on .NET Object Types |
|
|
213 | (1) |
|
Defining Partial and Parameterized Active Patterns |
|
|
214 | (1) |
|
Hiding Abstract Syntax Implementations with Active Patterns |
|
|
214 | (2) |
|
Equality, Hashing, and Comparison for New Structured Data Types |
|
|
216 | (1) |
|
Equality, Hashing, and Comparison |
|
|
216 | (2) |
|
Asserting Equality, Hashing, and Comparison Using Attributes |
|
|
218 | (1) |
|
Fully Customizing Equality, Hashing, and Comparison on a Type |
|
|
219 | (1) |
|
Suppressing Equality, Hashing, and Comparison on a Type |
|
|
220 | (1) |
|
Customizing Generic Collection Types |
|
|
221 | (1) |
|
Tail Calls and Recursive Programming |
|
|
222 | (1) |
|
Tail Recursion and List Processing |
|
|
223 | (2) |
|
Tail Recursion and Object-Oriented Programming |
|
|
225 | (1) |
|
Tail Recursion and Processing Unbalanced Trees |
|
|
226 | (1) |
|
Using Continuations to Avoid Stack Overflows |
|
|
227 | (1) |
|
Another Example: Processing Syntax Trees |
|
|
228 | (3) |
|
|
230 | (1) |
|
Chapter 10 Numeric Programming and Charting |
|
|
231 | (26) |
|
Basic Charting with FSharpChart |
|
|
231 | (2) |
|
Basic Numeric Types and Literals |
|
|
233 | (1) |
|
|
234 | (1) |
|
|
234 | (1) |
|
|
235 | (1) |
|
|
235 | (1) |
|
Overloaded Math Functions |
|
|
236 | (1) |
|
|
236 | (1) |
|
Sequences, Statistics and Numeric Code |
|
|
237 | (1) |
|
Summing, Averaging, Maximizing and Minimizing Sequences |
|
|
237 | (2) |
|
Counting and Categorizing |
|
|
239 | (1) |
|
Writing Fresh Numeric Code |
|
|
240 | (1) |
|
Making Numeric Code Generic |
|
|
241 | (1) |
|
|
242 | (2) |
|
Statistics, Linear Algebra and Distributions with Math.NET |
|
|
244 | (1) |
|
Basic Statistical Functions in Math.NET Numerics |
|
|
245 | (1) |
|
Using Histograms and Distributions from Math.NET Numerics |
|
|
246 | (2) |
|
Using Matrices and Vectors from Math.NET |
|
|
248 | (1) |
|
Matrix Inverses, Decompositions and Eigenvalues |
|
|
249 | (1) |
|
|
250 | (1) |
|
Adding Units to a Numeric Algorithms |
|
|
251 | (2) |
|
Adding Units to a Type Definition |
|
|
253 | (1) |
|
Applying and Removing Units |
|
|
254 | (1) |
|
Some Limitations of Units of Measure |
|
|
254 | (3) |
|
|
255 | (2) |
|
Chapter 11 Reactive, Asynchronous, and Parallel Programming |
|
|
257 | (38) |
|
Introducing Some Terminology |
|
|
258 | (1) |
|
|
259 | (1) |
|
Events as First-Class Values |
|
|
260 | (1) |
|
Creating and Publishing Events |
|
|
260 | (2) |
|
Using and Designing Background Workers |
|
|
262 | (2) |
|
Building a Simpler Iterative Worker |
|
|
264 | (3) |
|
Raising Additional Events from Background Workers |
|
|
267 | (1) |
|
Connecting a Background Worker to a GUI |
|
|
268 | (2) |
|
Introducing Asynchronous and Parallel Computations |
|
|
270 | (1) |
|
Fetching Multiple Web Pages in Parallel, Asynchronously |
|
|
270 | (2) |
|
Understanding Thread Hopping |
|
|
272 | (1) |
|
Under the Hood: What Are Asynchronous Computations? |
|
|
273 | (2) |
|
Parallel File Processing Using Asynchronous Workflows |
|
|
275 | (3) |
|
Running Asynchronous Computations |
|
|
278 | (1) |
|
Common I/O Operations in Asynchronous Workflows |
|
|
279 | (1) |
|
Using Tasks with Asynchronous Programming |
|
|
280 | (1) |
|
Understanding Exceptions and Cancellation |
|
|
280 | (1) |
|
Under the Hood: Implementing Async.Parallel |
|
|
281 | (1) |
|
Using async for CPU Parallelism with Fixed Tasks |
|
|
282 | (1) |
|
|
282 | (1) |
|
|
283 | (1) |
|
Creating Objects That React to Messages |
|
|
284 | (2) |
|
Scanning Mailboxes for Relevant Messages |
|
|
286 | (1) |
|
Example: Asynchronous Web Crawling |
|
|
287 | (3) |
|
|
290 | (1) |
|
Using Shared-Memory Concurrency |
|
|
290 | (1) |
|
Creating Threads Explicitly |
|
|
291 | (1) |
|
Shared Memory, Race Conditions, and the .NET Memory Model |
|
|
291 | (1) |
|
Using Locks to Avoid Race Conditions |
|
|
292 | (1) |
|
|
293 | (1) |
|
Some Other Concurrency Primitives |
|
|
294 | (1) |
|
|
294 | (1) |
|
Chapter 12 Symbolic Programming with Structured Data |
|
|
295 | (36) |
|
Verifying Circuits with Propositional Logic |
|
|
295 | (1) |
|
Representing Propositional Logic |
|
|
296 | (2) |
|
Evaluating Propositional Logic Naively |
|
|
298 | (2) |
|
From Circuits to Propositional Logic |
|
|
300 | (3) |
|
Checking Simple Properties of Circuits |
|
|
303 | (1) |
|
Representing Propositional Formulae Efficiently Using BDDs |
|
|
303 | (4) |
|
Circuit Verification with BDDs |
|
|
307 | (2) |
|
Symbolic Differentiation and Expression Rendering |
|
|
309 | (1) |
|
Modeling Simple Algebraic Expressions |
|
|
310 | (2) |
|
Implementing Local Simplifications |
|
|
312 | (1) |
|
A Richer Language of Algebraic Expressions |
|
|
313 | (2) |
|
Parsing Algebraic Expressions |
|
|
315 | (2) |
|
Simplifying Algebraic Expressions |
|
|
317 | (2) |
|
Symbolic Differentiation of Algebraic Expressions |
|
|
319 | (1) |
|
|
320 | (7) |
|
Building the User Interface |
|
|
327 | (4) |
|
|
329 | (2) |
|
Chapter 13 Integrating External Data and Services |
|
|
331 | (22) |
|
|
332 | (1) |
|
Getting Data in JSON Format |
|
|
333 | (1) |
|
Parsing the XML or JSON Data |
|
|
333 | (1) |
|
|
334 | (1) |
|
Getting Started with Type Providers and Queries |
|
|
335 | (1) |
|
Example - Language Integrated 0Data |
|
|
335 | (1) |
|
|
336 | (1) |
|
|
337 | (2) |
|
Handling Pagination in 0Data |
|
|
339 | (1) |
|
Example - Language Integrated SQL |
|
|
340 | (1) |
|
|
341 | (1) |
|
|
342 | (1) |
|
|
342 | (1) |
|
|
343 | (1) |
|
|
343 | (1) |
|
|
344 | (1) |
|
|
344 | (1) |
|
More on Relational Databases and ADO.NET |
|
|
345 | (2) |
|
Establishing Connections using ADO.NET |
|
|
347 | (1) |
|
Creating a Database using ADO.NET |
|
|
348 | (1) |
|
Creating Tables using ADO.NET |
|
|
348 | (2) |
|
Using Stored Procedures via ADO.NET |
|
|
350 | (1) |
|
|
351 | (2) |
|
|
352 | (1) |
|
Chapter 14 Building Smart Web Applications |
|
|
353 | (38) |
|
Serving Web Content the Simple Way |
|
|
353 | (5) |
|
Building Ajax Rich Client Applications |
|
|
358 | (1) |
|
Learning More from the WebSharper Documentation |
|
|
359 | (1) |
|
Getting Started with WebSharper |
|
|
360 | (2) |
|
Calling Server Code from the Client |
|
|
362 | (1) |
|
|
363 | (1) |
|
Online vs. Offline Sitelets |
|
|
364 | (1) |
|
Serving Content from WebSharper Sitelets |
|
|
365 | (2) |
|
|
367 | (1) |
|
Embedding Client-Side Controls in Sitelet Pages |
|
|
368 | (1) |
|
Constructing and Combining Sitelets |
|
|
369 | (3) |
|
Sitelet Routers and Controllers |
|
|
372 | (1) |
|
Constructing Sitelets for Handling Non-GET HTTP Commands |
|
|
372 | (7) |
|
|
379 | (8) |
|
Dependent Formlets and Flowlets |
|
|
387 | (1) |
|
Automated Resource Tracking and Handling |
|
|
387 | (1) |
|
Using Third-Party JavaScript Libraries |
|
|
388 | (1) |
|
Working with .NET Proxies |
|
|
389 | (2) |
|
|
390 | (1) |
|
Chapter 15 Building Mobile Web Applications |
|
|
391 | (36) |
|
Web-based vs. Native Mobile Applications |
|
|
391 | (2) |
|
Feature Detection and Polyfilling in WebSharper |
|
|
393 | (2) |
|
Mobile Capabilities, Touch Events, and Mobile Frameworks |
|
|
395 | (2) |
|
|
397 | (1) |
|
Building a Mobile Web Application for iOS Devices |
|
|
398 | (1) |
|
Fleshing Out the Application |
|
|
399 | (5) |
|
|
404 | (2) |
|
Developing Social Networking Applications |
|
|
406 | (3) |
|
Configuring Your New Facebook Application |
|
|
409 | (1) |
|
Defining the Main HTML Application |
|
|
410 | (5) |
|
|
415 | (2) |
|
Developing Android Applications with WebSharper |
|
|
417 | (1) |
|
Setting Up and Testing with Your Android Environment |
|
|
418 | (2) |
|
Using the Android Application Visual Studio Template |
|
|
420 | (1) |
|
Implementing Your Native Android Application |
|
|
421 | (6) |
|
|
426 | (1) |
|
Chapter 16 Visualization and Graphical User Interfaces |
|
|
427 | (50) |
|
Writing "Hello, World!" in a Click |
|
|
427 | (1) |
|
Understanding the Anatomy of a Graphical Application |
|
|
428 | (1) |
|
Composing User Interfaces |
|
|
429 | (4) |
|
|
433 | (5) |
|
Writing Your Own Controls |
|
|
438 | (1) |
|
Developing a Custom Control |
|
|
438 | (3) |
|
|
441 | (1) |
|
Displaying Samples from Sensors |
|
|
441 | (2) |
|
Building the GraphControl: The Model |
|
|
443 | (2) |
|
Building the GraphControl: Style Properties and Controller |
|
|
445 | (4) |
|
Building the GraphControl: The View |
|
|
449 | (4) |
|
|
453 | (1) |
|
Creating a Mandelbrot Viewer |
|
|
454 | (1) |
|
|
454 | (1) |
|
|
455 | (2) |
|
Creating the Visualization Application |
|
|
457 | (3) |
|
Creating the Application Plumbing |
|
|
460 | (5) |
|
Windows Presentation Foundation |
|
|
465 | (1) |
|
|
466 | (2) |
|
|
468 | (3) |
|
|
471 | (3) |
|
|
474 | (2) |
|
|
476 | (1) |
|
|
476 | (1) |
|
Chapter 17 Language-Oriented Programming: Advanced Techniques |
|
|
477 | (26) |
|
|
478 | (2) |
|
An Example: Success/Failure Workflows |
|
|
480 | (3) |
|
Defining a Workflow Builder |
|
|
483 | (2) |
|
Workflows and Untamed Side Effects |
|
|
485 | (1) |
|
Computation Expressions with Custom Query Operators |
|
|
486 | (1) |
|
Example: Probabilistic Workflows |
|
|
487 | (5) |
|
Combining Workflows and Resources |
|
|
492 | (1) |
|
Recursive Workflow Expressions |
|
|
492 | (1) |
|
|
492 | (1) |
|
|
493 | (1) |
|
Schema Compilation by Reflecting on Types |
|
|
493 | (4) |
|
Using the F# Dynamic Reflection Operators |
|
|
497 | (1) |
|
|
498 | (1) |
|
Example: Using F# Quotations for Error Estimation |
|
|
499 | (2) |
|
Resolving Reflected Definitions |
|
|
501 | (2) |
|
|
501 | (2) |
|
Chapter 18 Libraries and Interoperating with Other Languages |
|
|
503 | (34) |
|
Types, memory and interoperability |
|
|
503 | (1) |
|
Libraries: A High-Level Overview |
|
|
504 | (1) |
|
Namespaces from the .NET Framework |
|
|
505 | (2) |
|
Namespaces from the F# Libraries |
|
|
507 | (1) |
|
|
508 | (1) |
|
Using Further F# and .NET Data Structures |
|
|
508 | (1) |
|
System.Collections.Generic and Other .NET Collections |
|
|
509 | (1) |
|
Supervising and Isolating Execution |
|
|
509 | (1) |
|
Further Libraries for Reflective Techniques |
|
|
510 | (1) |
|
|
510 | (1) |
|
Using Microsoft.FSharp.Reflection |
|
|
511 | (1) |
|
Some Other .NET Types You May Encounter |
|
|
511 | (1) |
|
Under the Hood: Interoperating with C# and other .NET Languages |
|
|
512 | (1) |
|
The Common Language Runtime |
|
|
512 | (2) |
|
Memory Management at Runtime |
|
|
514 | (2) |
|
|
516 | (1) |
|
Calling COM Components from F# |
|
|
516 | (5) |
|
|
521 | (1) |
|
Interoperating with C and C++ with Pinvoke |
|
|
522 | (1) |
|
Getting Started with PInvoke |
|
|
523 | (2) |
|
Mapping C Data Structures to F# Code |
|
|
525 | (1) |
|
Marshalling Parameters to and from C |
|
|
526 | (2) |
|
Marshalling Strings to and from C |
|
|
528 | (2) |
|
Passing Function Pointers to C |
|
|
530 | (1) |
|
|
531 | (3) |
|
Wrapper Generation and Limits of PInvoke |
|
|
534 | (3) |
|
|
535 | (2) |
|
Chapter 19 Packaging, Debugging and Testing F# Code |
|
|
537 | (28) |
|
|
537 | (1) |
|
Mixing Scripting and Compiled Code |
|
|
537 | (1) |
|
Choosing Optimization Settings |
|
|
538 | (1) |
|
|
539 | (1) |
|
Building Shared Libraries |
|
|
539 | (2) |
|
|
541 | (1) |
|
Packaging Different Kinds of Code |
|
|
541 | (1) |
|
Using Data and Configuration Settings |
|
|
542 | (1) |
|
|
543 | (3) |
|
Using More Features of the Visual Studio Debugger |
|
|
546 | (2) |
|
Instrumenting Your Program with the System.Diagnostics Namespace |
|
|
548 | (3) |
|
Debugging Concurrent and Graphical Applications |
|
|
551 | (2) |
|
Debugging and Testing with F# Interactive |
|
|
553 | (1) |
|
Controlling F# Interactive |
|
|
553 | (1) |
|
Some Common F# Interactive Directives |
|
|
554 | (1) |
|
Understanding How F# Interactive Compiles Code |
|
|
555 | (1) |
|
F# Interactive and Visual Studio |
|
|
556 | (1) |
|
|
557 | (8) |
|
|
563 | (2) |
|
Chapter 20 Designing F# Libraries |
|
|
565 | (18) |
|
Designing Vanilla .NET Libraries |
|
|
566 | (5) |
|
Understanding Functional Design Methodology |
|
|
571 | (1) |
|
Understanding Where Functional Programming Comes From |
|
|
571 | (1) |
|
Understanding Functional Design Methodology |
|
|
572 | (2) |
|
Applying the .NET Library Design Guidelines to F# |
|
|
574 | (1) |
|
Recommendation: Use the .NET Naming and Capitalization Conventions Where Possible |
|
|
574 | (2) |
|
Recommendation: Avoid Using Underscores in Names |
|
|
576 | (1) |
|
Recommendation: Follow the .NET Guidelines for Exceptions |
|
|
577 | (1) |
|
Recommendation: Consider Using Option Values for Return Types Instead of Raising Exceptions |
|
|
577 | (1) |
|
Recommendation: Follow the .NET Guidelines for Value Types |
|
|
577 | (1) |
|
Recommendation: Consider Using Explicit Signature Files for Your Framework |
|
|
578 | (1) |
|
Recommendation: Consider Avoiding the Use of Implementation Inheritance for Extensibility |
|
|
578 | (1) |
|
Recommendation: Use Properties and Methods for Attributes and Operations Essential to a Type |
|
|
578 | (1) |
|
Recommendation: Avoid Revealing Concrete Data Representations Such as Records |
|
|
579 | (1) |
|
Recommendation: Use Active Patterns to Hide the Implementations of Discriminated Unions |
|
|
579 | (1) |
|
Recommendation: Use Object Interface Types Instead of Tuples or Records of Functions |
|
|
579 | (1) |
|
Recommendation: Understand When Currying Is Useful in Functional Programming APIs |
|
|
579 | (1) |
|
Recommendation: Use Tuples for Return Values, Arguments, and Intermediate Values |
|
|
580 | (1) |
|
Some Recommended Coding Idioms |
|
|
580 | (1) |
|
Recommendation: Use the Standard Operators |
|
|
581 | (1) |
|
Recommendation: Place the Pipeline Operator |> at the Start of a Line |
|
|
581 | (1) |
|
Recommendation: Format Object Expressions Using the member Syntax |
|
|
581 | (2) |
|
|
582 | (1) |
Index |
|
583 | |