Author Topic: Mapcar / Lambda Tutorial  (Read 5507 times)

0 Members and 1 Guest are viewing this topic.

Lee Mac

  • Seagull
  • Posts: 12926
  • London, England
Mapcar / Lambda Tutorial
« on: April 14, 2011, 06:27:18 PM »
My sincerest apologies if the Moderators deem this to be posted in the wrong place or not suitable for this forum, feel free to move/remove.

I have attempted to provide an introductory explanation of the mapcar & lambda functions, and thought I'd share it here, since it seems to be an area that many beginners find difficult to understand.

Mapcar & Lambda

I hope it is comprehensible and welcome any questions about the content, suggestions for improvement, or indeed notification of any mistakes found.


Lee

Oak3s

  • Guest
Re: Mapcar / Lambda Tutorial
« Reply #1 on: April 14, 2011, 07:22:19 PM »
Thank you. I have needed something like this. Much appreciated.

Lee Mac

  • Seagull
  • Posts: 12926
  • London, England
Re: Mapcar / Lambda Tutorial
« Reply #2 on: April 14, 2011, 07:50:19 PM »
Thank you. I have needed something like this. Much appreciated.

You're very welcome Oak3s - if you need any clarification on any part, just ask  :-)

Coder

  • Swamp Rat
  • Posts: 827
Re: Mapcar / Lambda Tutorial
« Reply #3 on: April 15, 2011, 07:37:45 AM »
Great .

A very important thread and information as well .

Thank you Lee.

Lee Mac

  • Seagull
  • Posts: 12926
  • London, England
Re: Mapcar / Lambda Tutorial
« Reply #4 on: April 15, 2011, 07:41:15 AM »
You're welcome Coder - glad it helps   :-)

rkmcswain

  • Swamp Rat
  • Posts: 978
Re: Mapcar / Lambda Tutorial
« Reply #5 on: April 15, 2011, 08:13:09 AM »
Nice Lee. Thanks.

I got my original tutorial on this back in the day from a newsgroup post, not unlike this one.

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
Re: Mapcar / Lambda Tutorial
« Reply #6 on: April 15, 2011, 08:22:22 AM »
TheSwamp.org  (serving the CAD community since 2003)

Lee Mac

  • Seagull
  • Posts: 12926
  • London, England
Re: Mapcar / Lambda Tutorial
« Reply #7 on: April 15, 2011, 08:30:51 AM »
Nice Lee. Thanks.

I got my original tutorial on this back in the day from a newsgroup post, not unlike this one.

Thanks rkmcswain - that post is also a great learning resource as it covers some aspects in a little more depth  :-)

Lee Mac

  • Seagull
  • Posts: 12926
  • London, England
Re: Mapcar / Lambda Tutorial
« Reply #8 on: April 15, 2011, 08:31:39 AM »
couple of more good posts on mapcar/lambda.

http://www.theswamp.org/index.php?topic=2953.0 (MP)

http://www.theswamp.org/index.php?topic=340.0 (CAB)

HTH

Thanks Mark! I thought I'd seen the example of capitalising names somewhere before - no wonder it stuck in my mind  8-)

Krushert

  • Seagull
  • Posts: 13679
  • FREE BEER Tomorrow!!
Re: Mapcar / Lambda Tutorial
« Reply #9 on: April 15, 2011, 01:31:05 PM »
Excellent Tutorial.  Thanks. 


To Mark and Mods; should there be a child board under AutoLISP section for LISP tutorials.  There seems to me a lot of them and putting them into section would be easier to find. 

Just my 1/2 cent opinion.
I + XI = X is true ...  ... if you change your perspective.

I no longer CAD or Model, I just hang out here picking up the empties beer cans

GDF

  • Water Moccasin
  • Posts: 2081
Re: Mapcar / Lambda Tutorial
« Reply #10 on: April 15, 2011, 02:53:11 PM »
Excellent Tutorial.  Thanks. 


To Mark and Mods; should there be a child board under AutoLISP section for LISP tutorials.  There seems to me a lot of them and putting them into section would be easier to find. 

Just my 1/2 cent opinion.

Great Idea!!!
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

Krushert

  • Seagull
  • Posts: 13679
  • FREE BEER Tomorrow!!
Re: Mapcar / Lambda Tutorial
« Reply #11 on: April 15, 2011, 02:57:58 PM »
Excellent Tutorial.  Thanks. 


To Mark and Mods; should there be a child board under AutoLISP section for LISP tutorials.  There seems to me a lot of them and putting them into section would be easier to find. 

Just my 1/2 cent opinion.

Ohh I should say I will help out by digging thru muck to find past tutorial threads and I will put a list of links together for threads to move to the new section or at the very least point a link to their current position. 
I + XI = X is true ...  ... if you change your perspective.

I no longer CAD or Model, I just hang out here picking up the empties beer cans

Lee Mac

  • Seagull
  • Posts: 12926
  • London, England
Re: Mapcar / Lambda Tutorial
« Reply #12 on: April 15, 2011, 02:58:10 PM »
There is already of course the 'Teach Me' forum:

http://www.theswamp.org/index.php?board=4.0

But a forum dedicate to LISP tutorials would be cool - perhaps the theads in the 'Problems & Solutions' thread could also be sorted and grouped in such a forum. Sounds like a lot of work though...

Lee

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Mapcar / Lambda Tutorial
« Reply #13 on: April 15, 2011, 10:20:49 PM »

The reason I created the 'Problems & Solutions Links' thread was so that people could post a link and comments on routines/threads that they find particularly helpfull.
Sorting and grouping it WOULD be difficult and time consuming, and would require on-going maintenance if any semblance of it's current intent is to be retained.

Perhaps the next generation of members will start adding to it for the benefit of all, instead of collating and manufacturing  'out of context' smut.

kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Krushert

  • Seagull
  • Posts: 13679
  • FREE BEER Tomorrow!!
Re: Mapcar / Lambda Tutorial
« Reply #14 on: April 16, 2011, 04:57:04 PM »
I offered anyway.     :| :|
I + XI = X is true ...  ... if you change your perspective.

I no longer CAD or Model, I just hang out here picking up the empties beer cans

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Mapcar / Lambda Tutorial
« Reply #15 on: April 17, 2011, 05:06:54 AM »

This may be a good place to add links to tutorials
http://www.theswamp.org/index.php?topic=37604.0

... or make a new thread
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.