Skip to content

Commit ec9ac6b

Browse files
committed
Merge branch 'master' of github.com:dmbaturin/ocaml-book
2 parents ea5ff5e + 795e74b commit ec9ac6b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

book/09_lists-and-structural-recursion.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ of the list:
7474
let squares = List.map (fun x -> x * x) [1; 2; 3]
7575
```
7676

77-
The `List.filter : ('a -> bool) -> 'a list -> 'a list` function should also look familar since it's implemented by many languages:
77+
The `List.filter : ('a -> bool) -> 'a list -> 'a list` function should also look familiar since it's implemented by many languages:
7878

7979
```ocaml
8080
let evens = List.filter (fun x -> x mod 2 = 0) [1; 2; 3; 4] (* evens = [2; 4] *)
@@ -128,7 +128,7 @@ let () =
128128

129129
## Defining the list type
130130

131-
Many data structures, including linked lists, can be defined _inductively.
131+
Many data structures, including linked lists, can be defined _inductively_.
132132

133133
An _inductive definition_ consists of two parts: a _base case_ that defines the least possible element,
134134
and an _inductive step_ that defines how to make larger structures from it.
@@ -215,7 +215,7 @@ The generalization of mathematical induction for data structures is known as _st
215215

216216
Every inductive definition of a function can be naturally converted to a recursive algorithm, assuming we know how to destructure
217217
a value into its parts. For the factorial function, we had to substitute destructuring a natural number _n_ into
218-
_m + 1_ with substracting one from it.
218+
_m + 1_ with subtracting one from it.
219219

220220
Data structures defined as sum types can be directly destructured using pattern matching, which makes them easy to use with recursive functions.
221221

book/styles/main.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ pre
9696

9797
code, kbd {
9898
color: var(--command-color);
99-
font-family: monospace;
10099
}
101100

102101
/* ToC hardly needs list bullets. */
@@ -120,8 +119,9 @@ body
120119
width: 100%;
121120
}
122121

123-
/* For some reason on most system the default monospace font looks smaller. */
124-
pre, code, kbd { font-size: 110%; }
122+
/* For some reason on most system the default monospace font looks smaller.
123+
This brings them back to normal. */
124+
pre, code, kbd { font-family: monospace, monospace; }
125125

126126
@supports (hyphens: auto) {
127127
main {

0 commit comments

Comments
 (0)