diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-12-31 15:46:53 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-12-31 15:46:53 -0500 |
| commit | 156d54a73e005eecbb9a4284b74994313a34e4aa (patch) | |
| tree | b54f5574213df750d2b7292a088172f43b9f86a5 /stdlib/arrays.c | |
| parent | 4b11f1b2b63effe71ddac5aac0879c1512057e8b (diff) | |
Add array:pop()
Diffstat (limited to 'stdlib/arrays.c')
| -rw-r--r-- | stdlib/arrays.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/stdlib/arrays.c b/stdlib/arrays.c index e5ffbfd4..1f4b8252 100644 --- a/stdlib/arrays.c +++ b/stdlib/arrays.c @@ -217,7 +217,7 @@ public void Array$remove_item(Array_t *arr, void *item, Int_t max_removals, cons } } -public Int_t Array$find(Array_t arr, void *item, const TypeInfo_t *type) +public OptionalInt_t Array$find(Array_t arr, void *item, const TypeInfo_t *type) { const TypeInfo_t *item_type = type->ArrayInfo.item; for (int64_t i = 0; i < arr.length; i++) { @@ -227,7 +227,7 @@ public Int_t Array$find(Array_t arr, void *item, const TypeInfo_t *type) return NONE_INT; } -public Int_t Array$first(Array_t arr, Closure_t predicate) +public OptionalInt_t Array$first(Array_t arr, Closure_t predicate) { bool (*is_good)(void*, void*) = (void*)predicate.fn; for (int64_t i = 0; i < arr.length; i++) { |
