Add filter, map and reduce to Array

This commit is contained in:
Tomasz Chabora
2020-10-19 21:21:16 +02:00
committed by kobewi
parent eb57dcdb90
commit c50acc7339
4 changed files with 132 additions and 0 deletions

View File

@@ -101,6 +101,9 @@ public:
Array duplicate(bool p_deep = false) const;
Array slice(int p_begin, int p_end, int p_step = 1, bool p_deep = false) const;
Array filter(const Callable &p_callable) const;
Array map(const Callable &p_callable) const;
Variant reduce(const Callable &p_callable, const Variant &p_accum) const;
bool operator<(const Array &p_array) const;
bool operator<=(const Array &p_array) const;