example :
(map + (list 1 2) (list 3 4) (list 5 6))
(9 12)
suppose now i have a list : (list (list 1 2) (list 3 4) (list 5 6))
and i want to do the same with the elements of the list, how can i do?
note here i have 3 elements in ((list 1 2) (list 3 4) (list 5 6)) but the solution must works for any number of elements.
i can not find a solution to this problem in Scheme ,and it is not the first time i have this problem.
this is really a problem in scheme, for this reason some,srfi give methods working both on elements and on container containing the elements (vector or list)
example:
(array-ref array k ...)
(array-ref array index)
Returns the contents of the element of array at index k .... The sequence k ... must be a valid index to array. In the second form, index must be either a vector or a 0-based 1-dimensional array containing k
in SRFI 25: Multi-dimensional Array Primitives
what i want to do is a sum of lists taking advantage of the n-arity of + operator......
presented differently, i have a list of elements (e1 e2 ... eN) in scheme and i want to do
(map + e1 e2 ... eN)
eN being a list of numbers ,each eN of the same length
if i remember ,for example Kawa scheme allow unsplicing @lst outside of a back-quote
but this non standart