| 157 | U each_sum (U (*e)(const T &)) const { U result = 0; for (int32_t i = 0; i < count; i++) result += e(data[i]); return result; } |
| 158 | template <typename U> |
| 159 | array_t<U> each_new (U (*e)(const T &)) const { array_t<U> result = {}; result.resize(count); for (int32_t i=0; i<count; i++) result.add(e(data[i])); return result; } |
| 160 | void free (); |
| 161 | |
| 162 | static array_t<T> make (int32_t capacity) { array_t<T> result = {}; result.resize(capacity); return result; } |