Thanks! That should work. I modified it to make it slightly more efficient:
julia> @btime reduce(⊕, view(A,2:length(A)), init=copy(A[1]));
3.578 ms (8 allocations: 8.00 MiB)
Thanks! That should work. I modified it to make it slightly more efficient:
julia> @btime reduce(⊕, view(A,2:length(A)), init=copy(A[1]));
3.578 ms (8 allocations: 8.00 MiB)