Removing nil from list

V

vtcad

Guest
How do I remove an element from a list? I am trying to remove an
element nil.

thanks,
 
On 8 May 2006 12:19:16 -0700, "vtcad" <Roland.Fontaine@gmail.com> wrote:

How do I remove an element from a list? I am trying to remove an
element nil.

thanks,
a='(1 2 nil 3)
a=remove(nil a) => (1 2 3)

This removes all occurrences of nil from the list. There's also the
destructive form:

a=remd(nil a)

Regards,

Andrew.

Andrew Beckett
Principal European Technology Leader
Cadence Design Systems, UK.
 

Welcome to EDABoard.com

Sponsor

Back
Top