[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Element-wise sum of a set of finite sequences



Hello,

I was wondering how one would specify in an elegant way the sum of finite sequences of integer in a set S.

Example:

Let S = { << 1,2,3 >>, << 3,4,6 >> }

The result of the function would be : << 1+3, 2+4, 3+6>> that the finite sequence <<4,6,9>>

The function has to work for an arbitrary number of finite sequences, provided they have the same length obviously.

Could someone guide towards this spec please ?

Thanks in advance !

- Francesco