summaryrefslogtreecommitdiff
path: root/core/variant/variant_call.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-05-06 20:44:01 +0200
committerGitHub <noreply@github.com>2021-05-06 20:44:01 +0200
commit01f80201bf6a7a3f3d0de420f18c8f68363dbe62 (patch)
tree56e4e98f6b31d109e6404e898f8c6ba3396a34d4 /core/variant/variant_call.cpp
parentee4ef9709dcd03c17f5d7ee19c75ad29cd14cb44 (diff)
parentc50acc7339162eac734b20344c6422b740b978ab (diff)
Merge pull request #38645 from KoBeWi/FMR
Add filter, map and reduce to Array
Diffstat (limited to 'core/variant/variant_call.cpp')
-rw-r--r--core/variant/variant_call.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/variant/variant_call.cpp b/core/variant/variant_call.cpp
index 455e924568..efaaa8cd19 100644
--- a/core/variant/variant_call.cpp
+++ b/core/variant/variant_call.cpp
@@ -1745,6 +1745,9 @@ static void _register_variant_builtin_methods() {
bind_method(Array, reverse, sarray(), varray());
bind_method(Array, duplicate, sarray("deep"), varray(false));
bind_method(Array, slice, sarray("begin", "end", "step", "deep"), varray(1, false));
+ bind_method(Array, filter, sarray("method"), varray());
+ bind_method(Array, map, sarray("method"), varray());
+ bind_method(Array, reduce, sarray("method", "accum"), varray(Variant()));
bind_method(Array, max, sarray(), varray());
bind_method(Array, min, sarray(), varray());