Skip to content

Commit 976f7ea

Browse files
committed
correct 'previous chapter' references
Chapters 4 & 5 were swapped so chapter 6's references to 'the previous chapter' are incorrect.
1 parent ec46253 commit 976f7ea

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

text/chapter6.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ Type class instances can be defined in one of two places: in the same module tha
167167

168168
## Exercises
169169

170-
1. (Easy) Define a `Show` instance for `Point`. Match the same output as the `showPoint` function from the previous chapter. _Note:_ Point is now a `newtype` (instead of a `type` synonym), which allows us to customize how to `show` it. Otherwise, we'd be stuck with the default `Show` instance for records.
170+
1. (Easy) Define a `Show` instance for `Point`. Match the same output as the `showPoint` function from chapter 4. _Note:_ Point is now a `newtype` (instead of a `type` synonym), which allows us to customize how to `show` it. Otherwise, we'd be stuck with the default `Show` instance for records.
171171

172172
```haskell
173173
{{#include ../exercises/chapter6/test/no-peeking/Solutions.purs:Point}}
@@ -372,13 +372,13 @@ The following newtype represents a complex number:
372372

373373
4. (Easy) Derive (via `newtype`) a `Ring` instance for `Complex`. _Note_: You may instead write this instance manually, but that's not as convenient.
374374

375-
Here's the `Shape` ADT from the previous chapter:
375+
Here's the `Shape` ADT from chapter 4:
376376

377377
```haskell
378378
{{#include ../exercises/chapter6/test/no-peeking/Solutions.purs:Shape}}
379379
```
380380

381-
5. (Medium) Derive (via `Generic`) a `Show` instance for `Shape`. How does the amount of code written and `String` output compare to `showShape` from the previous chapter? _Hint_: See the [Deriving from `Generic`](https://github.com/purescript/documentation/blob/master/guides/Type-Class-Deriving.md#deriving-from-generic) section of the [Type Class Deriving](https://github.com/purescript/documentation/blob/master/guides/Type-Class-Deriving.md) guide.
381+
5. (Medium) Derive (via `Generic`) a `Show` instance for `Shape`. How does the amount of code written and `String` output compare to `showShape` chapter 4? _Hint_: See the [Deriving from `Generic`](https://github.com/purescript/documentation/blob/master/guides/Type-Class-Deriving.md#deriving-from-generic) section of the [Type Class Deriving](https://github.com/purescript/documentation/blob/master/guides/Type-Class-Deriving.md) guide.
382382

383383
## Type Class Constraints
384384

0 commit comments

Comments
 (0)