aboutsummaryrefslogtreecommitdiff
path: root/docs/pointers.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/pointers.md
parent59845e610f2c90474f34079d27b5f1e07071ded4 (diff)
Change method calls to use `foo.baz()` instead of `foo:baz()`
Diffstat (limited to 'docs/pointers.md')
-rw-r--r--docs/pointers.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/pointers.md b/docs/pointers.md
index f1bd1b5a..36cab2c1 100644
--- a/docs/pointers.md
+++ b/docs/pointers.md
@@ -94,12 +94,12 @@ For convenience, most operations that work on values can work with pointers to
values implicitly. For example, if you have a struct type with a `.foo` field,
you can use `ptr.foo` on a pointer to that struct type as well, without needing
to use `ptr[].foo`. The same is true for array accesses like `ptr[i]` and method
-calls like `ptr:reversed()`.
+calls like `ptr.reversed()`.
# Read-Only Views
-In a small number of API methods (`array:first()`, `array:binary_search()`,
-`array:sort()`, `array:sorted()`, and `array:heapify()`), the methods allow you
+In a small number of API methods (`array.first()`, `array.binary_search()`,
+`array.sort()`, `array.sorted()`, and `array.heapify()`), the methods allow you
to provide custom comparison functions. However, for safety, we don't actually
want the comparison methods to be able mutate the values inside of immutable
array values. For implementation reasons, we can't pass the values themselves
@@ -112,7 +112,7 @@ inside of any datastructures as elements or members.
```tomo
nums := @[10, 20, 30]
->> nums:first(func(x:&Int): x / 2 == 10)
+>> nums.first(func(x:&Int): x / 2 == 10)
= 2 : Int?
```