#include int sum(const std::array &arr) { int ret; for(int elem: arr) { ret += elem; } return ret; }