Skip to content

Commit 191a3b6

Browse files
committed
fix: add missing alt attributes for images, for eBook validation
1 parent 2c95999 commit 191a3b6

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

ch3.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,11 @@ From mathisfun.com:
102102
103103
In other words, it's just a relation between two values: the input and the output. Though each input has exactly one output, that output doesn't necessarily have to be unique per input. Below shows a diagram of a perfectly valid function from `x` to `y`;
104104

105-
<img src="images/function-sets.gif" />(http://www.mathsisfun.com/sets/function.html)
105+
<img src="images/function-sets.gif" alt="function sets" />(http://www.mathsisfun.com/sets/function.html)
106106

107107
To contrast, the following diagram shows a relation that is *not* a function since the input value `5` points to several outputs:
108108

109-
<img src="images/relation-not-function.gif" />(http://www.mathsisfun.com/sets/function.html)
109+
<img src="images/relation-not-function.gif" alt="relation not function" />(http://www.mathsisfun.com/sets/function.html)
110110

111111
Functions can be described as a set of pairs with the position (input, output): `[(1,2), (3,6), (5,10)]` (It appears this function doubles its input).
112112

@@ -115,7 +115,7 @@ Or perhaps a table:
115115

116116
Or even as a graph with `x` as the input and `y` as the output:
117117

118-
<img src="images/fn_graph.png" width="300" height="300" />
118+
<img src="images/fn_graph.png" width="300" height="300" alt="function graph" />
119119

120120

121121
There's no need for implementation details if the input dictates the output. Since functions are simply mappings of input to output, one could simply jot down object literals and run them with `[]` instead of `()`.

ch5.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ Composition will be our tool for constructing programs and, as luck would have i
199199

200200
Category theory is an abstract branch of mathematics that can formalize concepts from several different branches such as set theory, type theory, group theory, logic, and more. It primarily deals with objects, morphisms, and transformations, which mirrors programming quite closely. Here is a chart of the same concepts as viewed from each separate theory.
201201

202-
<img src="images/cat_theory.png" />
202+
<img src="images/cat_theory.png" alt="category theory" />
203203

204204
Sorry, I didn't mean to frighten you. I don't expect you to be intimately familiar with all these concepts. My point is to show you how much duplication we have so you can see why category theory aims to unify these things.
205205

@@ -213,7 +213,7 @@ In category theory, we have something called... a category. It is defined as a c
213213
Category theory is abstract enough to model many things, but let's apply this to types and functions, which is what we care about at the moment.
214214

215215
**A collection of objects**
216-
The objects will be data types. For instance, ``String``, ``Boolean``, ``Number``, ``Object``, etc. We often view data types as sets of all the possible values. One could look at ``Boolean`` as the set of `[true, false]` and ``Number`` as the set of all possible numeric values. Treating types as sets is useful because we can use set theory to work with them.
216+
The objects will be data types. For instance, ``String``, ``Boolean``, ``Number``, ``Object``, etc. We often view data types as sets of all the possible values. One could look at ``Boolean`` as the set of `[true, false]` and ``Number`` as the set of all possible numeric values. Treating types as sets is useful because we can use set theory to work with them.
217217

218218

219219
**A collection of morphisms**
@@ -224,8 +224,8 @@ This, as you may have guessed, is our brand new toy - `compose`. We've discussed
224224

225225
Here is an image demonstrating composition:
226226

227-
<img src="images/cat_comp1.png" />
228-
<img src="images/cat_comp2.png" />
227+
<img src="images/cat_comp1.png" alt="category composition 1" />
228+
<img src="images/cat_comp2.png" alt="category composition 2" />
229229

230230
Here is a concrete example in code:
231231

ch6.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ app('cats');
132132

133133
This calls our `url` function, then passes the string to our `getJSON` function, which has been partially applied with `trace`. Loading the app will show the response from the api call in the console.
134134

135-
<img src="images/console_ss.png"/>
135+
<img src="images/console_ss.png" alt="console response" />
136136

137137
We'd like to construct images out of this json. It looks like the srcs are buried in `items` then each `media`'s `m` property.
138138

@@ -181,7 +181,7 @@ var app = _.compose(Impure.getJSON(renderImages), url);
181181

182182
And we're done!
183183

184-
<img src="images/cats_ss.png" />
184+
<img src="images/cats_ss.png" alt="cats grid" />
185185

186186
Here is the finished script:
187187
```js

0 commit comments

Comments
 (0)