diff options
| author | Cliff Click <cliffc@acm.org> | 2025-08-16 13:35:32 -0700 |
|---|---|---|
| committer | Cliff Click <cliffc@acm.org> | 2025-08-16 13:35:32 -0700 |
| commit | 721f14bcc8752d156d52553a3ca544680c7e9b72 (patch) | |
| tree | ad2106a480c4925fa1463f8cf00b10bf7f355b7a /chapter23/README.md | |
| parent | e3f4b691ab524a60b4b878eaa5142b3ba56fe981 (diff) | |
| download | Simple-721f14bcc8752d156d52553a3ca544680c7e9b72.tar.gz Simple-721f14bcc8752d156d52553a3ca544680c7e9b72.zip | |
More docs
Diffstat (limited to 'chapter23/README.md')
| -rw-r--r-- | chapter23/README.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/chapter23/README.md b/chapter23/README.md index 946853f7..cac55253 100644 --- a/chapter23/README.md +++ b/chapter23/README.md @@ -54,10 +54,10 @@ used for type-checking, so sharper types means we allow more valid programs. **Why Cyclic Types Now**? Because we hit them as soon as we allow a function definition inside of a struct which takes the struct as an argument, -i.e. *methods* talking a *self* argument. +i.e. *methods* taking a *self* argument. Lets look at our `String.indexOf` example above. Here we define a `String` -class with an `indexOf` method; a hiddent argument string `self` is passed in +with an `indexOf` method; a hidden argument string `self` is passed in and searched. What is the type of `struct String`? `struct String { u8[~] buf; { String self, u8 c -> int } indexOf; }` |
