aboutsummaryrefslogtreecommitdiff
path: root/docs/lists.md
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-04-18 16:21:19 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-04-18 16:21:19 -0400
commit0974d632c3dda7874f01c58bfc342b73cd1634a4 (patch)
tree67fecbca860bb6156ba403d55315fa71eae11436 /docs/lists.md
parent171d80ac1e5bd006c2c600f36a42440dfb635605 (diff)
Fix docs
Diffstat (limited to 'docs/lists.md')
-rw-r--r--docs/lists.md9
1 files changed, 5 insertions, 4 deletions
diff --git a/docs/lists.md b/docs/lists.md
index 9f15457b..141f6abd 100644
--- a/docs/lists.md
+++ b/docs/lists.md
@@ -240,7 +240,7 @@ variable or dereference a heap pointer, it may trigger copy-on-write behavior.
- [`func find(list: [T], target: T -> Int?)`](#find)
- [`func first(list: [T], predicate: func(item:&T -> Bool) -> Int)`](#first)
- [`func from(list: [T], first: Int -> [T])`](#from)
-- [`func has(list: [T] -> Bool)`](#has)
+- [`func has(list: [T], element: T -> Bool)`](#has)
- [`func heap_pop(list: @[T], by: func(x,y:&T->Int32) = T.compare -> T?)`](#heap_pop)
- [`func heap_push(list: @[T], item: T, by=T.compare -> Void)`](#heap_push)
- [`func heapify(list: @[T], by: func(x,y:&T->Int32) = T.compare -> Void)`](#heapify)
@@ -422,16 +422,17 @@ A new list starting from the specified index.
---
### `has`
-Checks if the list has any elements.
+Checks if the list has an element.
```tomo
-func has(list: [T] -> Bool)
+func has(list: [T], element: T -> Bool)
```
- `list`: The list to check.
+- `target`: The element to check for.
**Returns:**
-`yes` if the list has elements, `no` otherwise.
+`yes` if the list has the target, `no` otherwise.
**Example:**
```tomo