aboutsummaryrefslogtreecommitdiff
path: root/docs/iterators.md
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-04-06 14:20:18 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-04-06 14:20:18 -0400
commit2bb2ff871fa1761478442bec5f6a32c9428360a1 (patch)
tree9b73df7a0c50c02353ae7bca7c2cd54788ef0077 /docs/iterators.md
parent59845e610f2c90474f34079d27b5f1e07071ded4 (diff)
Change method calls to use `foo.baz()` instead of `foo:baz()`
Diffstat (limited to 'docs/iterators.md')
-rw-r--r--docs/iterators.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/iterators.md b/docs/iterators.md
index ff7ed138..8d585ccb 100644
--- a/docs/iterators.md
+++ b/docs/iterators.md
@@ -8,13 +8,13 @@ For example, the `Path.each_line()` API method returns a function that
successively gets one line from a file at a time until the file is exhausted:
```tomo
-(./test.txt):write("
+(./test.txt).write("
line one
line two
line three
")
->> iter := (./test.txt):each_line()
+>> iter := (./test.txt).each_line()
>> iter()
= "line one" : Text?
>> iter()
@@ -24,7 +24,7 @@ successively gets one line from a file at a time until the file is exhausted:
>> iter()
= none : Text?
-for line in (./test.txt):each_line():
+for line in (./test.txt).each_line():
pass
```
@@ -38,7 +38,7 @@ func primes_up_to(limit:Int):
if n > limit:
return !Int
- while not n:is_prime():
+ while not n.is_prime():
n += 1
n += 1