function sum_lower_brackets(remaining_brackets, acc = 0) {
if (remaining_brackets.length == 0) return [];
return [acc + remaining_brackets[0]].concat(sum_lower_brackets(remaining_brackets.slice(1), acc + remaining_brackets[0]));
function sum_lower_brackets(remaining_brackets, acc = 0) {
if (remaining_brackets.length == 0) return [];
return [acc + remaining_brackets[0]].concat(sum_lower_brackets(remaining_brackets.slice(1), acc + remaining_brackets[0]));