Implement a Python program that returns the sum of the elements in an array.
[4, 8, 12, 16]
def arraySum(arr):
    if len(arr) == 0:
        return 0
    else: 
        return arr[0] + arraySum(arr[1:])

print(arraySum([4, 8, 12, 16])) # 40