4 lines
91 B
Python
4 lines
91 B
Python
def sum_array(arr):
|
|
if not arr:
|
|
return 0
|
|
return arr[0] + sum_array(arr[1:]) |