Skip to content

Commit e1692f5

Browse files
committed
Copyediting chapter 12
1 parent 0b3c899 commit e1692f5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

12_language.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ specialForms.if = (args, scope) => {
259259

260260
{{index "conditional execution", "ternary operator", "?: operator", "conditional operator"}}
261261

262-
Egg's `if` construct expects exactly three arguments. It will evaluate the first, and if the result isn't the value `false`, it will evaluate the second. Otherwise, the third gets evaluated. This `if` form is more similar to JavaScript's ternary `?:` operator than to JavaScript's `if`. It is an expression, not a statement, and it produces a value, namely, the result of the second or third argument.
262+
Egg's `if` construct expects exactly three arguments. It will evaluate the first, and if the result isn't the value `false`, it will evaluate the second. Otherwise, the third gets evaluated. This `if` form is more similar to JavaScript's ternary `?:` operator than to JavaScript's `if`. It is an expression, not a statement, and it produces a valuenamely, the result of the second or third argument.
263263

264264
{{index Boolean}}
265265

@@ -281,7 +281,7 @@ specialForms.while = (args, scope) => {
281281
}
282282
283283
// Since undefined does not exist in Egg, we return false,
284-
// for lack of a meaningful result.
284+
// for lack of a meaningful result
285285
return false;
286286
};
287287
```
@@ -383,7 +383,7 @@ do(define(total, 0),
383383

384384
{{index "summing example", "Egg language"}}
385385

386-
This is the program we've seen several times before that computes the sum of the numbers 1 to 10, expressed in Egg. It is clearly uglier than the equivalent JavaScript program—but not bad for a language implemented in less than 150 ((lines of code)).
386+
This is the program we've seen several times before that computes the sum of the numbers 1 to 10, expressed in Egg. It is clearly uglier than the equivalent JavaScript program—but not bad for a language implemented in fewer than 150 ((lines of code)).
387387

388388
{{id egg_fun}}
389389

0 commit comments

Comments
 (0)