From c50acc7339162eac734b20344c6422b740b978ab Mon Sep 17 00:00:00 2001 From: Tomasz Chabora Date: Mon, 19 Oct 2020 21:21:16 +0200 Subject: Add filter, map and reduce to Array --- core/variant/variant_call.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'core/variant/variant_call.cpp') diff --git a/core/variant/variant_call.cpp b/core/variant/variant_call.cpp index deaccc6304..8988a0c4ed 100644 --- a/core/variant/variant_call.cpp +++ b/core/variant/variant_call.cpp @@ -1666,6 +1666,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()); -- cgit v1.2.3