Skip to content

Commit

Permalink
doc/quick-guide: Update wording
Browse files Browse the repository at this point in the history
  • Loading branch information
lhmouse committed Dec 2, 2023
1 parent 45ddc27 commit 065f5a4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions doc/quick-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,11 @@ which takes a `comparator` function has the same requirement on it, which is

Other results usually indicate that `x` and `y` are unordered, and are likely
to cause exceptions to be thrown. This specification matches the built-in
'spaceship' operator `<=>`. Therefore, in order to sort an array in reverse
order, we need to define a lambda, i.e. an anonymous function, that returns
_spaceship_ operator_ `<=>`. Therefore, in order to sort an array in reverse
order, we need to define a lambda, i.e. an anonymous function, which returns
the opposite of the default comparison result. There are actually two ways to
do this, either `func(x, y) { return -(x <=> y); }` or `func(x, y) { return y
<=> x; }`. We use the second form, and it looks like
achieve this, either `func(x, y) { return -(x <=> y); }` or `func(x, y) {
return y <=> x; }`. We use the second form, and it looks like

```
#3:1> std.array.sort([8,4,6,9,2,5,3,0,1,7], \
Expand Down Expand Up @@ -208,8 +208,8 @@ without `{ return ref` or `; }`.

## Exceptions and Error Handling

Exceptions are used extensively in the runtime and standard library for error
handling, as in
Exceptions are used extensively in the runtime and the standard library for
error handling, as in

```
#1:1> 1 / 0
Expand Down

0 comments on commit 065f5a4

Please sign in to comment.