diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-03-05 00:21:30 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-03-05 00:21:30 -0500 |
| commit | 0a3ad8ba914ab42ebbb88a3d955f71d71d581fc1 (patch) | |
| tree | e984b58347627f0417a6961dbb8e83afe4739653 /docs/arrays.md | |
| parent | 665050940f1562b045efe942686d04b3c3fac381 (diff) | |
Alphabetize and index functions
Diffstat (limited to 'docs/arrays.md')
| -rw-r--r-- | docs/arrays.md | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/docs/arrays.md b/docs/arrays.md index 29965fb4..4d9c1175 100644 --- a/docs/arrays.md +++ b/docs/arrays.md @@ -232,6 +232,33 @@ variable or dereference a heap pointer, it may trigger copy-on-write behavior. ## Array Methods +- [`func binary_search(arr: [T], by: func(x,y:&T->Int32) = T.compare -> Int)`](#`binary_search) +- [`func by(arr: [T], step: Int -> [T])`](#`by) +- [`func clear(arr: @[T] -> Void)`](#`clear) +- [`func counts(arr: [T] -> {T,Int})`](#`counts) +- [`func find(arr: [T], target: T -> Int?)`](#`find) +- [`func first(arr: [T], predicate: func(item:&T -> Bool) -> Int)`](#`first) +- [`func from(arr: [T], first: Int -> [T])`](#`from) +- [`func has(arr: [T] -> Bool)`](#`has) +- [`func heap_pop(arr: @[T], by: func(x,y:&T->Int32) = T.compare -> T?)`](#`heap_pop) +- [`func heap_push(arr: @[T], item: T, by=T.compare -> Void)`](#`heap_push) +- [`func heapify(arr: @[T], by: func(x,y:&T->Int32) = T.compare -> Void)`](#`heapify) +- [`func insert(arr: @[T], item: T, at: Int = 0 -> Void)`](#`insert) +- [`func insert_all(arr: @[T], items: [T], at: Int = 0 -> Void)`](#`insert_all) +- [`func pop(arr: &[T], index: Int = -1 -> T?)`](#`pop) +- [`func random(arr: [T], rng: RNG = random -> T)`](#`random) +- [`func remove_at(arr: @[T], at: Int = -1, count: Int = 1 -> Void)`](#`remove_at) +- [`func remove_item(arr: @[T], item: T, max_count: Int = -1 -> Void)`](#`remove_item) +- [`func reversed(arr: [T] -> [T])`](#`reversed) +- [`func sample(arr: [T], count: Int, weights: [Num]? = ![Num], rng: RNG = random -> [T])`](#`sample) +- [`func shuffle(arr: @[T], rng: RNG = random -> Void)`](#`shuffle) +- [`func shuffled(arr: [T], rng: RNG = random -> [T])`](#`shuffled) +- [`func slice(arr: [T], from: Int, to: Int -> [T])`](#`slice) +- [`func sort(arr: @[T], by=T.compare -> Void)`](#`sort) +- [`sorted(arr: [T], by=T.compare -> [T])`](#`sorted) +- [`to(arr: [T], last: Int -> [T])`](#`to) +- [`unique(arr: [T] -> {T})`](#`unique) + ### `binary_search` **Description:** |
