Skip to content

Commit cb2e6fc

Browse files
fixing unicode errors in build: more fixes needed (#1701)
* more fixes needed * Add missing backslashes * Check docs in CI * Revert "Add missing backslashes" This reverts commit c19ac75. --------- Co-authored-by: Richard Dominick <34370238+RichDom2185@users.noreply.github.com>
1 parent 9bf8bcb commit cb2e6fc

File tree

3 files changed

+36
-32
lines changed

3 files changed

+36
-32
lines changed

.github/workflows/nodejs.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ jobs:
2929
- name: Install dependencies (apt)
3030
run: |
3131
sudo apt-get update && \
32-
sudo apt-get install -y --no-install-recommends libxi-dev libgl1-mesa-dev
32+
sudo apt-get install -y --no-install-recommends \
33+
libxi-dev libgl1-mesa-dev \
34+
texlive texlive-fonts-extra texlive-lang-cjk latexmk latex-cjk-all
3335
- name: Setup Node
3436
uses: actions/setup-node@v4
3537
with:
@@ -42,6 +44,8 @@ jobs:
4244
- run: yarn test-coverage
4345
env:
4446
CI: true
47+
- name: Check that docs build
48+
run: yarn jsdoc prepare
4549
- name: Coveralls
4650
uses: coverallsapp/github-action@master
4751
with:

docs/lib/list.js

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
/**
44
* **primitive**; makes a pair whose head (first component) is <CODE>x</CODE>
5-
* and whose tail (second component) is <CODE>y</CODE>; time: <CODE>Θ(1)</CODE, space: <CODE>Θ(1)</CODE>.
5+
* and whose tail (second component) is <CODE>y</CODE>; time: <CODE>Theta(1)</CODE, space: <CODE>Theta(1)</CODE>.
66
* @param {value} x - given head
77
* @param {value} y - given tail
88
* @returns {pair} pair with <CODE>x</CODE> as head and <CODE>y</CODE> as tail.
@@ -11,29 +11,29 @@ function pair(x, y) {}
1111

1212
/**
1313
* **primitive**; returns <CODE>true</CODE> if <CODE>x</CODE> is a
14-
* pair and false otherwise; time: <CODE>Θ(1)</CODE, space: <CODE>Θ(1)</CODE>.
14+
* pair and false otherwise; time: <CODE>Theta(1)</CODE, space: <CODE>Theta(1)</CODE>.
1515
* @param {value} x - given value
1616
* @returns {boolean} whether <CODE>x</CODE> is a pair
1717
*/
1818
function is_pair(x) {}
1919

2020
/**
21-
* **primitive**; returns head (first component) of given pair <CODE>p</CODE>; time: <CODE>Θ(1)</CODE, space: <CODE>Θ(1)</CODE>.
21+
* **primitive**; returns head (first component) of given pair <CODE>p</CODE>; time: <CODE>Theta(1)</CODE, space: <CODE>Theta(1)</CODE>.
2222
* @param {pair} p - given pair
2323
* @returns {value} head of <CODE>p</CODE>
2424
*/
2525
function head(p) {}
2626

2727
/**
28-
* **primitive**; returns tail (second component of given pair <CODE>p</CODE>; time: <CODE>Θ(1)</CODE, space: <CODE>Θ(1)</CODE>.
28+
* **primitive**; returns tail (second component of given pair <CODE>p</CODE>; time: <CODE>Theta(1)</CODE, space: <CODE>Theta(1)</CODE>.
2929
* @param {pair} p - given pair
3030
* @returns {value} tail of <CODE>p</CODE>
3131
*/
3232
function tail(p) {}
3333

3434
/**
3535
* **primitive**; returns <CODE>true</CODE> if <CODE>x</CODE> is the
36-
* empty list <CODE>null</CODE>, and <CODE>false</CODE> otherwise; time: <CODE>Θ(1)</CODE, space: <CODE>Θ(1)</CODE>.
36+
* empty list <CODE>null</CODE>, and <CODE>false</CODE> otherwise; time: <CODE>Theta(1)</CODE, space: <CODE>Theta(1)</CODE>.
3737
* @param {value} x - given value
3838
* @returns {boolean} whether <CODE>x</CODE> is <CODE>null</CODE>
3939
*/
@@ -43,7 +43,7 @@ function is_null(x) {}
4343
* **primitive**; returns <CODE>true</CODE> if
4444
* <CODE>xs</CODE> is a list as defined in the textbook, and
4545
* <CODE>false</CODE> otherwise. Iterative process;
46-
* time: <CODE>Θ(n)</CODE>, space: <CODE>Θ(1)</CODE>, where <CODE>n</CODE>
46+
* time: <CODE>Theta(n)</CODE>, space: <CODE>Theta(1)</CODE>, where <CODE>n</CODE>
4747
* is the length of the
4848
* chain of <CODE>tail</CODE> operations that can be applied to <CODE>xs</CODE>.
4949
* <CODE>is_list</CODE> recurses down the list and checks that it ends with the empty list null
@@ -54,7 +54,7 @@ function is_list(xs) {}
5454

5555
/**
5656
* **primitive**; given <CODE>n</CODE> values, returns a list of length <CODE>n</CODE>.
57-
* The elements of the list are the given values in the given order; time: <CODE>Θ(n)</CODE, space: <CODE>Θ(n)</CODE>.
57+
* The elements of the list are the given values in the given order; time: <CODE>Theta(n)</CODE, space: <CODE>Theta(n)</CODE>.
5858
* @param {value} value1,value2,...,value_n - given values
5959
* @returns {list} list containing all values
6060
*/
@@ -63,7 +63,7 @@ function list(value1, value2, ...values ) {}
6363
/**
6464
* visualizes the arguments in a separate drawing
6565
* area in the Source Academy using box-and-pointer diagrams; time, space:
66-
* <CODE>Θ(n)</CODE>, where <CODE>n</CODE> is the total number of data structures such as
66+
* <CODE>Theta(n)</CODE>, where <CODE>n</CODE> is the total number of data structures such as
6767
* pairs in the arguments.
6868
* @param {value} value1,value2,...,value_n - given values
6969
* @returns {value} given <CODE>x</CODE>
@@ -82,7 +82,7 @@ function list(value1, value2, ...values ) {}
8282
* with <CODE>===</CODE> (using the definition of <CODE>===</CODE> in the
8383
* respective Source language in use).
8484
* Time, space:
85-
* <CODE>Θ(n)</CODE>, where <CODE>n</CODE> is the total number of data structures such as
85+
* <CODE>Theta(n)</CODE>, where <CODE>n</CODE> is the total number of data structures such as
8686
* pairs in <CODE>x</CODE> and <CODE>y</CODE>.
8787
* @param {value} x - given value
8888
* @param {value} y - given value
@@ -110,8 +110,8 @@ function equal(xs, ys) {
110110
/**
111111
* Returns the length of the list
112112
* <CODE>xs</CODE>.
113-
* Iterative process; time: <CODE>Θ(n)</CODE>, space:
114-
* <CODE>Θ(1)</CODE>, where <CODE>n</CODE> is the length of <CODE>xs</CODE>.
113+
* Iterative process; time: <CODE>Theta(n)</CODE>, space:
114+
* <CODE>Theta(1)</CODE>, where <CODE>n</CODE> is the length of <CODE>xs</CODE>.
115115
* @param {list} xs - given list
116116
* @returns {number} length of <CODE>xs</CODE>
117117
*/
@@ -125,8 +125,8 @@ function $length(xs, acc) {
125125
/**
126126
* Returns a list that results from list
127127
* <CODE>xs</CODE> by element-wise application of unary function <CODE>f</CODE>.
128-
* Iterative process; time: <CODE>Θ(n)</CODE> (apart from <CODE>f</CODE>),
129-
* space: <CODE>Θ(n)</CODE> (apart from <CODE>f</CODE>), where <CODE>n</CODE> is the length of <CODE>xs</CODE>.
128+
* Iterative process; time: <CODE>Theta(n)</CODE> (apart from <CODE>f</CODE>),
129+
* space: <CODE>Theta(n)</CODE> (apart from <CODE>f</CODE>), where <CODE>n</CODE> is the length of <CODE>xs</CODE>.
130130
* <CODE>f</CODE> is applied element-by-element:
131131
* <CODE>map(f, list(1, 2))</CODE> results in <CODE>list(f(1), f(2))</CODE>.
132132
* @param {function} f - unary
@@ -147,7 +147,7 @@ function $map(f, xs, acc) {
147147
* Makes a list with <CODE>n</CODE>
148148
* elements by applying the unary function <CODE>f</CODE>
149149
* to the numbers 0 to <CODE>n - 1</CODE>, assumed to be a nonnegative integer.
150-
* Iterative process; time: <CODE>Θ(n)</CODE> (apart from <CODE>f</CODE>), space: <CODE>Θ(n)</CODE> (apart from <CODE>f</CODE>).
150+
* Iterative process; time: <CODE>Theta(n)</CODE> (apart from <CODE>f</CODE>), space: <CODE>Theta(n)</CODE> (apart from <CODE>f</CODE>).
151151
* @param {function} f - unary function
152152
* @param {number} n - given nonnegative integer
153153
* @returns {list} resulting list
@@ -162,7 +162,7 @@ function $build_list(i, fun, already_built) {
162162
/**
163163
* Applies unary function <CODE>f</CODE> to every
164164
* element of the list <CODE>xs</CODE>.
165-
* Iterative process; time: <CODE>Θ(n)</CODE> (apart from <CODE>f</CODE>), space: <CODE>Θ(1)</CODE> (apart from <CODE>f</CODE>),
165+
* Iterative process; time: <CODE>Theta(n)</CODE> (apart from <CODE>f</CODE>), space: <CODE>Theta(1)</CODE> (apart from <CODE>f</CODE>),
166166
* where <CODE>n</CODE> is the length of <CODE>xs</CODE>.
167167
* <CODE>f</CODE> is applied element-by-element:
168168
* <CODE>for_each(fun, list(1, 2))</CODE> results in the calls
@@ -186,7 +186,7 @@ function for_each(fun, xs) {
186186
* Returns a string that represents
187187
* list <CODE>xs</CODE> using the text-based box-and-pointer notation
188188
* <CODE>[...]</CODE>.
189-
* Iterative process; time: <CODE>Θ(n)</CODE> where <CODE>n</CODE> is the size of the list, space: <CODE>Θ(m)</CODE> where <CODE>m</CODE> is the length of the string.
189+
* Iterative process; time: <CODE>Theta(n)</CODE> where <CODE>n</CODE> is the size of the list, space: <CODE>Theta(m)</CODE> where <CODE>m</CODE> is the length of the string.
190190
* The process is iterative, but consumes space <CODE>O(m)</CODE>
191191
* because of the result string.
192192
* @param {list} xs - given list
@@ -209,9 +209,9 @@ function $list_to_string(xs, cont) {
209209

210210
/**
211211
* Returns list <CODE>xs</CODE> in reverse
212-
* order. Iterative process; time: <CODE>Θ(n)</CODE>,
213-
* space: <CODE>Θ(n)</CODE>, where <CODE>n</CODE> is the length of <CODE>xs</CODE>.
214-
* The process is iterative, but consumes space <CODE>Θ(n)</CODE>
212+
* order. Iterative process; time: <CODE>Theta(n)</CODE>,
213+
* space: <CODE>Theta(n)</CODE>, where <CODE>n</CODE> is the length of <CODE>xs</CODE>.
214+
* The process is iterative, but consumes space <CODE>Theta(n)</CODE>
215215
* because of the result list.
216216
* @param {list} xs - given list
217217
* @returns {list} <CODE>xs</CODE> in reverse
@@ -228,8 +228,8 @@ function $reverse(original, reversed) {
228228
/**
229229
* Returns a list that results from
230230
* appending the list <CODE>ys</CODE> to the list <CODE>xs</CODE>.
231-
* Iterative process; time: <CODE>Θ(n)</CODE>, space:
232-
* <CODE>Θ(n)</CODE>, where <CODE>n</CODE> is the length of <CODE>xs</CODE>.
231+
* Iterative process; time: <CODE>Theta(n)</CODE>, space:
232+
* <CODE>Theta(n)</CODE>, where <CODE>n</CODE> is the length of <CODE>xs</CODE>.
233233
* In the result, null at the end of the first argument list
234234
* is replaced by the second argument, regardless what the second
235235
* argument consists of.
@@ -251,8 +251,8 @@ function $append(xs, ys, cont) {
251251
* whose head is identical to
252252
* <CODE>v</CODE> (using <CODE>===</CODE>); returns <CODE>null</CODE> if the
253253
* element does not occur in the list.
254-
* Iterative process; time: <CODE>Θ(n)</CODE>,
255-
* space: <CODE>Θ(1)</CODE>, where <CODE>n</CODE> is the length of <CODE>xs</CODE>.
254+
* Iterative process; time: <CODE>Theta(n)</CODE>,
255+
* space: <CODE>Theta(1)</CODE>, where <CODE>n</CODE> is the length of <CODE>xs</CODE>.
256256
* @param {value} v - given value
257257
* @param {list} xs - given list
258258
* @returns {list} postfix sublist that starts with <CODE>v</CODE>
@@ -270,7 +270,7 @@ function member(v, xs) {
270270
* is identical (<CODE>===</CODE>) to <CODE>v</CODE>.
271271
* Returns the original
272272
* list if there is no occurrence. Iterative process;
273-
* time: <CODE>Θ(n)</CODE>, space: <CODE>Θ(n)</CODE>, where <CODE>n</CODE>
273+
* time: <CODE>Theta(n)</CODE>, space: <CODE>Theta(n)</CODE>, where <CODE>n</CODE>
274274
* is the length of <CODE>xs</CODE>.
275275
* @param {value} v - given value
276276
* @param {list} xs - given list
@@ -294,7 +294,7 @@ function $remove(v, xs, acc) {
294294
* Returns the original
295295
* list if there is no occurrence.
296296
* Iterative process;
297-
* time: <CODE>Θ(n)</CODE>, space: <CODE>Θ(n)</CODE>, where <CODE>n</CODE>
297+
* time: <CODE>Theta(n)</CODE>, space: <CODE>Theta(n)</CODE>, where <CODE>n</CODE>
298298
* is the length of <CODE>xs</CODE>.
299299
* @param {value} v - given value
300300
* @param {list} xs - given list
@@ -317,7 +317,7 @@ function $remove_all(v, xs, acc) {
317317
* <CODE>pred</CODE>
318318
* returns <CODE>true</CODE>.
319319
* Iterative process;
320-
* time: <CODE>Θ(n)</CODE> (apart from <CODE>pred</CODE>), space: <CODE>Θ(n)</CODE> (apart from <CODE>pred</CODE>),
320+
* time: <CODE>Theta(n)</CODE> (apart from <CODE>pred</CODE>), space: <CODE>Theta(n)</CODE> (apart from <CODE>pred</CODE>),
321321
* where <CODE>n</CODE> is the length of <CODE>xs</CODE>.
322322
* @param {function} pred - unary function returning boolean value
323323
* @param {list} xs - given list
@@ -339,7 +339,7 @@ function $filter(pred, xs, acc) {
339339
* numbers starting from <CODE>start</CODE> using a step size of 1, until
340340
* the number exceeds (<CODE>&gt;</CODE>) <CODE>end</CODE>.
341341
* Iterative process;
342-
* time: <CODE>Θ(n)</CODE>, space: <CODE>Θ(n)</CODE>,
342+
* time: <CODE>Theta(n)</CODE>, space: <CODE>Theta(n)</CODE>,
343343
* where <CODE>n</CODE> is <CODE>end - start</CODE>.
344344
* @param {number} start - starting number
345345
* @param {number} end - ending number
@@ -359,7 +359,7 @@ function $enum_list(start, end, acc) {
359359
* of list <CODE>xs</CODE> at position <CODE>n</CODE>,
360360
* where the first element has index 0.
361361
* Iterative process;
362-
* time: <CODE>Θ(n)</CODE>, space: <CODE>Θ(1)</CODE>,
362+
* time: <CODE>Theta(n)</CODE>, space: <CODE>Theta(1)</CODE>,
363363
* where <CODE>n</CODE> is the length of <CODE>xs</CODE>.
364364
* @param {list} xs - given list
365365
* @param {number} n - given position
@@ -384,7 +384,7 @@ function list_ref(xs, n) {
384384
* list. Thus, <CODE>accumulate(f,zero,list(1,2,3))</CODE> results in
385385
* <CODE>f(1, f(2, f(3, zero)))</CODE>.
386386
* Iterative process;
387-
* time: <CODE>Θ(n)</CODE> (apart from <CODE>f</CODE>), space: <CODE>Θ(n)</CODE> (apart from <CODE>f</CODE>),
387+
* time: <CODE>Theta(n)</CODE> (apart from <CODE>f</CODE>), space: <CODE>Theta(n)</CODE> (apart from <CODE>f</CODE>),
388388
* where <CODE>n</CODE> is the length of <CODE>xs</CODE>.
389389
* @param {function} f - binary function
390390
* @param {value} initial - initial value
@@ -405,7 +405,7 @@ function $accumulate(f, initial, xs, cont) {
405405
* Optional second argument.
406406
* Similar to <CODE>display</CODE>, but formats well-formed lists nicely if detected;
407407
* time, space:
408-
* <CODE>Θ(n)</CODE>, where <CODE>n</CODE> is the total number of data structures such as
408+
* <CODE>Theta(n)</CODE>, where <CODE>n</CODE> is the total number of data structures such as
409409
* pairs in <CODE>x</CODE>.
410410
* @param {value} xs - list structure to be displayed
411411
* @param {string} s to be displayed, preceding <CODE>xs</CODE>

docs/lib/stream.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ function stream_for_each(fun, xs) {
184184
/**
185185
* Returns stream <CODE>xs</CODE> in reverse
186186
* order. Iterative process.
187-
* The process is iterative, but consumes space <CODE>Ω(n)</CODE>
187+
* The process is iterative, but consumes space <CODE>Omega(n)</CODE>
188188
* because of the result stream.
189189
* Lazy? No: <CODE>stream_reverse</CODE>
190190
* forces the exploration of the entire stream

0 commit comments

Comments
 (0)