Code:(append (list lista1) lista2)

Registered forum members do not see this ad.
I need to add two lists. Add one to the list each member of the list2. The result would be the list3.
The result:Code:(setq lista2 '((0.0 14.127) (10.314 6.634) (6.374 -5.491) (-6.374 -5.491) (-10.314 6.634))) (setq lista1 '(150.0 200.0))Code:lista3 ((150.0 214.127) (160.314 206.634).......(139.686 206.634))
Code:(append (list lista1) lista2)
"Potential has a shelf life." - Margaret Atwood

RenderMan, It's not right. You must use mapcar and lambda. But do not know how
Code:(foreach x lista2 (setq l (cons (list (+ (car x) (car lista1)) (+ (cadr x) (cadr lista1))) l))) (reverse l)
- When aim is being settled in my mind , I have to reach it and get it in hand whatever it costs and wherever it is and will never give up . Tharwat said
Code:(mapcar '(lambda ( a ) (mapcar '+ a lista1)) lista2)
Lee Mac Programming
With Mathematics there is the possibility of perfect rigour, so why settle for less?
Just another Swamper

O.K. Thanks to all three. Lee Mac option is what I wanted.
regards
Respectfully, you neglected to specify the requirement for Mapcar and Lambda in your original post.
I try not to suggest the more complex functions, when one neglects to demonstrate knowledge of the simpler (in this case Append)... Most certainly not because I think I know more than others, but simply that is how I learned.
... I stand corrected.
Second, had you tested the code I posted, you'd see that it does what you demonstrated in your original post (appending lista1 to the front of lista2).
Thankfully, other(s) have already answered your question, given the supplemental criteria.
"Potential has a shelf life." - Margaret Atwood
Lee Mac Programming
With Mathematics there is the possibility of perfect rigour, so why settle for less?
Just another Swamper
Post corrected.
"Potential has a shelf life." - Margaret Atwood

Registered forum members do not see this ad.
Sorry. My English is the English translator of Google. It is archaic and poor, but I do not know more. I express myself best I can.
Thank you.
Bookmarks