Jump to content

To add two lists.


robierzo

Recommended Posts

I need to add two lists. Add one to the list each member of the list2. The result would be the list3.

(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))

 

The result:

lista3 ((150.0 214.127) (160.314 206.634).......(139.686 206.634))

Link to comment
Share on other sites

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.

 

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).

... I stand corrected.

 

Thankfully, other(s) have already answered your question, given the supplemental criteria.

Link to comment
Share on other sites

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).

 

Look a little closer at the OP's requirement Renderman - the solution that you proposed is not equivalent to the others posted in this thread. ;)

Link to comment
Share on other sites

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.

 

Perhaps I failed to consider that when posting my reply. Please know that I mean no offense. I was hasty, and mistaken.

 

I genuinely am glad that you received the help you were looking for, even if I did not properly understand the request. I will try to pay more attention to this fact in the future.

 

Cheers! :beer:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...