Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Half Title
Title Page
Copyright
Table of Contents
Preface
1 Getting started
1.1 Values, types, identifiers and declarations
1.2 Simple function declarations
1.3 Anonymous functions. Function expressions
1.4 Recursion
1.5 Pairs
1.6 Types and type checking
1.7 Bindings and environments
1.8 Euclid’s algorithm
1.9 Evaluations with environments
1.10 Free-standing programs
Summary
Exercises
2 Values, operators, expressions and functions
2.1 Numbers. Truth values. The unit type
2.2 Operator precedence and association
2.3 Characters and strings
2.4 If-then-else expressions
2.5 Overloaded functions and operators
2.6 Type inference
2.7 Functions are first-class citizens
2.8 Closures
2.9 Declaring prefix and infix operators
2.10 Equality and ordering
2.11 Function application operators |> and <|
2.12 Summary of the basic types
Summary
Exercises
3 Tuples, records and tagged values
3.1 Tuples
3.2 Polymorphism
3.3 Example: Geometric vectors
3.4 Records
3.5 Example: Quadratic equations
3.6 Locally declared identifiers
3.7 Example: Rational numbers. Invariants
3.8 Tagged values. Constructors
3.9 Enumeration types
3.10 Exceptions
3.11 Partial functions. The option type
Summary
Exercises
4 Lists
4.1 The concept of a list
4.2 Construction and decomposition of lists
4.3 Typical recursions over lists
4.4 Polymorphism
4.5 The value restrictions on polymorphic expressions
4.6 Examples. A model-based approach
Summary
Exercises
5 Collections: Lists, maps and sets
5.1 Lists
5.2 Finite sets
5.3 Maps
Summary
Exercises
6 Finite trees
6.1 Chinese boxes
6.2 Symbolic differentiation
6.3 Binary trees. Parameterized types
6.4 Traversal of binary trees. Search trees
6.5 Expression trees
6.6 Trees with a variable number of sub-trees. Mutual recursion
6.7 Electrical circuits
Summary
Exercises
7 Modules
7.1 Abstractions
7.2 Signature and implementation
7.3 Type augmentation. Operators in modules
7.4 Type extension
7.5 Classes and objects
7.6 Parameterized modules. Type variables in signatures
7.7 Customizing equality, hashing and the string function
7.8 Customizing ordering and indexing
7.9 Example: Piecewise linear plane curves
Summary
Exercises
8 Imperative features
8.1 Locations
8.2 Operators on locations
8.3 Default values
8.4 Sequential composition
8.5 Mutable record fields
8.6 References
8.7 While loops
8.8 Imperative functions on lists and other collections
8.9 Imperative tree traversal
8.10 Arrays
8.11 Imperative set and map
8.12 Functions on collections. Enumerator functions
8.13 Imperative queue
8.14 Restrictions on polymorphic expressions
Summary
Exercises
9 Efficiency
9.1 Resource measures
9.2 Memory management
9.3 Two problems
9.4 Solutions using accumulating parameters
9.5 Iterative function declarations
9.6 Tail recursion obtained using continuations
Summary
Exercises
10 Text processing programs
10.1 Keyword index example: Problem statement
10.2 Capturing data using regular expressions
10.3 Text I/O
10.4 File handling. Save and restore values in files
10.5 Reserving, using and disposing resources
10.6 Culture-dependent information. String orderings
10.7 Conversion to textual form. Date and time
10.8 Keyword index example: The IndexGen program
10.9 Keyword index example: Analysis of a web-source
10.10 Keyword index example: Putting it all together
Summary
Exercises
11 Sequences
11.1 The sequence concept in F#
11.2 Some operations on sequences
11.3 Delays, recursion and side-effects
11.4 Example: Sieve of Eratosthenes
11.5 Limits of sequences: Newton-Raphson approximations
11.6 Sequence expressions
11.7 Specializations of sequences
11.8 Type providers and databases
Summary
Exercises
12 Computation expressions
12.1 The agenda when defining your own computations
12.2 Introducing computation expressions using sequence expressions
12.3 The basic functions: For and Yield
12.4 The technical setting when defining your own computations
12.5 Example: Expression evaluation with error handling
12.6 The basic functions: Bind, Return, ReturnFrom and Zero
12.7 Controlling the computations: Delay and Start
12.8 The basic function: Delay
12.9 The fundamental properties of For and Yield, Bind and Return
12.10 Monadic parsers
Summary
Exercises
13 Asynchronous and parallel computations
13.1 Multi-core processors, cache memories and main memory
13.2 Processes, threads and tasks
13.3 Challenges and pitfalls in concurrency
13.4 Asynchronous computations
13.5 Reactive programs
13.6 Parallel computations
Summary
Exercises
Appendix A Programs from the keyword example
A.1 Web source files
A.2 The IndexGen program
A.3 The NextLevelRefs program
Appendix B The TextProcessing library
Appendix C The dialogue program from Chapter
References
Index
← Prev
Back
Next →
← Prev
Back
Next →