Python

#recursion

def total_sum(arr: list) -> int:
    if len(arr) == 1:
        return arr[0]
    return arr[0] + total_sum(arr[1:])

assert total_sum([1,2,3,4,5]) == 15