Programming Examples

Version 5.7.3

Bibliography | Glossary | Cover | Top

Table of Contents


1 Records
1.1 Records vs Tuples
1.2 Defining a Record
1.3 Creating a Record
1.4 Accessing a Record Field
1.5 Updating a Record
1.6 Type Testing
1.7 Pattern Matching
1.8 Nested Records
1.9 Example

2 Funs
2.1 Example 1 - map
2.2 Example 2 - foreach
2.3 The Syntax of Funs
2.4 Variable Bindings Within a Fun
2.5 Funs and the Module Lists
2.6 Funs Which Return Funs

3 List Comprehensions
3.1 Simple Examples
3.2 Quick Sort
3.3 Permutations
3.4 Pythagorean Triplets
3.5 Simplifications with List Comprehensions
3.6 Variable Bindings in List Comprehensions

4 Bit Syntax
4.1 Introduction
4.2 A Lexical Note
4.3 Segments
4.4 Defaults
4.5 Constructing Binaries and Bitstrings
4.6 Matching Binaries
4.7 Appending to a Binary