CADopia Inc.
Newsletter April 2008
Home Products E-Store Services Partners Company

Programming efficiently in Lisp

In the last month's article you have learned how to manipulate Lists. In this article we will learn more efficient ways of List handling. There are quite a few commands in AutoLisp that allow you to manipulate lists (subst, append, etc.).

But what about commands that will allow you to apply a function to items in a list ? Let's look at (mapcar) first.

(mapcar)

The function (mapcar) allows you to perform a "function" on each element of the list. Let's try a simple example :

What we want to do is add 1 to each element of a list.

(setq a 1)
(mapcar '1+ (list a))

Read More

Newsletter Feedback


CADopia 2008 All Rights Reserved.
Home | Products | E-Store | Services | Partners | Company
CADopia Request an evaluation CD
This offer is valid for Australia, Canada, India, Singapore, UK and USA addresses only.
E-Store
Contact sales@cadopia.com for more details.