mirror of
https://github.com/odin-lang/Odin.git
synced 2026-02-15 23:54:07 +00:00
Fixed grammar and expanded info
Fixed points made by Jeroen.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user