From 721f14bcc8752d156d52553a3ca544680c7e9b72 Mon Sep 17 00:00:00 2001 From: Cliff Click Date: Sat, 16 Aug 2025 13:35:32 -0700 Subject: More docs --- chapter23/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'chapter23') 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; }` -- cgit v1.2.3