Fixed grammar and expanded info

Fixed points made by Jeroen.
This commit is contained in:
NicknEma
2024-07-14 18:18:12 +02:00
parent d10694901f
commit 63276a85ba
2 changed files with 10 additions and 3 deletions

View File

@@ -8,6 +8,13 @@ An intrusive container requires a `Node` to be embedded in your own structure, l
value: string,
}
Embedding the members of a `list.Node` in your structure with the `using` keyword is also allowed:
My_String :: struct {
using node: list.Node,
value: string,
}
Here is a full example:
package test

View File

@@ -82,7 +82,7 @@ remove :: proc "contextless" (list: ^List, node: ^Node) {
}
}
/*
Removes from the given list all elements that satisfy a condition.
Removes from the given list all elements that satisfy a condition with O(N) time complexity.
**Inputs**
- list: The container list
@@ -109,7 +109,7 @@ remove_by_proc :: proc(list: ^List, to_erase: proc(^Node) -> bool) {
}
}
/*
Removes from the given list all elements that satisfy a condition.
Removes from the given list all elements that satisfy a condition with O(N) time complexity.
**Inputs**
- list: The container list
@@ -137,7 +137,7 @@ remove_by_proc_contextless :: proc(list: ^List, to_erase: proc "contextless" (^N
}
/*
Checks if the given list does not contain any element.
Checks whether the given list does not contain any element.
**Inputs**
- list: The container list