@@ -89,7 +89,7 @@ No matter what, the type of `Node n xs` is going to be `List`. There is no expan
89So let's return to wanting to represent a `Comment` that may have responses. There are a couple ways to do this:
89So let's return to wanting to represent a `Comment` that may have responses. There are a couple ways to do this:
92−### Obvious, but kind of annoying
92+### Obvious, but kind of annoying
95type Comment =
95type Comment =
@@ -133,7 +133,7 @@ upvote comment =
133 { comment | upvotes = 1 + comment.upvotes }
133 { comment | upvotes = 1 + comment.upvotes }
136−So rather than having to unwrap a `Comment` to do *anything* to it, you only have to do some unwrapping in the cases where you are doing something recusive. In practice, this means you will do less unwrapping which is nice.
136+So rather than having to unwrap a `Comment` to do *anything* to it, you only have to do some unwrapping in the cases where you are doing something recursive. In practice, this means you will do less unwrapping which is nice.
139## Mutually recursive type aliases
139## Mutually recursive type aliases
@@ -158,4 +158,4 @@ type SortBy = Time | Score | MostResponses
159When you try to expand `Comment` you have to expand `Responses` which needs to expand `Comment` which needs to expand `Responses`, etc.
159When you try to expand `Comment` you have to expand `Responses` which needs to expand `Comment` which needs to expand `Responses`, etc.
161−So this is just a fancy case of a self-recusive type alias. The solution is the same. Somewhere in that cycle, you need to define an actual `type` to end the infinite expansion.
161+So this is just a fancy case of a self-recursive type alias. The solution is the same. Somewhere in that cycle, you need to define an actual `type` to end the infinite expansion.