简介
Perface
1.
关于本书
2.
安装 OCaml
Introduction
3.
通过 OCaml 更好地编程
3.1.
OCaml 的过去
3.2.
OCaml 的现在
3.3.
Look to Your Future
3.4.
CS 3110 的简要历史
3.5.
总结
4.
OCaml 的基础
4.1.
The OCaml Toplevel
4.2.
编译 OCaml 程序
4.3.
Expressions
4.4.
Functions
4.5.
Documentation
4.6.
Printing
4.7.
Debugging
4.8.
Summary
4.9.
Exercises
OCaml Programming
5.
Data and Types
5.1.
List
5.2.
Variants
5.3.
Unit Testing with OUnit
5.4.
Records and Tuples
5.5.
Advanced Patten Matching
5.6.
Type Synonyms
5.7.
Options
5.8.
Association Lists
5.9.
Algebraic Data Types
5.10.
Exceptions
5.11.
Example: Tree
5.12.
Example: Natural Number
5.13.
Summary
5.14.
Exercises
6.
Higher-Order Programming
6.1.
Higher-Order Functions
6.2.
Map
6.3.
Filter
6.4.
Fold
6.5.
Beyond Lists
6.6.
Pipelining
6.7.
Currying
6.8.
Summary
6.9.
Exercises
7.
Modular Programming
7.1.
Module Systems
7.2.
Modules
7.3.
Modules and Toplevel
7.4.
Encapsulation
7.5.
Functional Data Structures
7.6.
Module Type Constrains
7.7.
Includes
7.8.
Functors
7.9.
Summary
7.10.
Exercises
Correctness and Efficiency
8.
Correctness
8.1.
specifications
8.2.
Function Documentation
8.3.
Module Doucumentation
8.4.
Testing And Debugging
8.5.
Black-box and Glass-box Testing
8.6.
Randomized Testing with QCheck
8.7.
Proving Correctness
8.8.
Structural Induction
8.9.
Algebraic Specification
8.10.
Summary
8.11.
Exercises
9.
Mutability
9.1.
Refs
9.2.
Mutable Fields
9.3.
Arrays And Loops
9.4.
Summary
9.5.
Exercises
10.
Data Structures
10.1.
Hash Tables
10.2.
Amortized Analysis
10.3.
Red-Black Trees
10.4.
Sequences
10.5.
Memoization
10.6.
Promises
10.7.
Monads
10.8.
Summary
10.9.
Exercises
Language Implementation
11.
Interpreters
11.1.
Example: Calculator
11.2.
Parsing
11.3.
Substitution Model
11.4.
Environment Model
11.5.
Type Checking
11.6.
Type Inference
11.7.
Summary
11.8.
Exercises
Lagniappe
12.
The Curry-Howard Correspondence
Appendix
13.
Big-Oh Notation
14.
Virtual Machine
Light
Rust
Coal
Navy
Ayu
Ocaml Programming
Arrays And Loops