From 0974d632c3dda7874f01c58bfc342b73cd1634a4 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Fri, 18 Apr 2025 16:21:19 -0400 Subject: Fix docs --- docs/lists.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'docs/lists.md') 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 -- cgit v1.2.3