(member item list)


Identify the first occurrence of an item in the list.


This function identifies the first occurrence of an item in a list. A list is returned, beginning with the first occurrence of the item and containing any items following it. This is useful if you need to make a change to a particular item in the list, but you aren't sure exactly where the item is.

 

Examples

Code Returns
(setq a '(1 2 3 4 3 2 1)) (1 2 3 4 3 2 1)

 

(member 3 a) (3 4 3 2 1)

 

(- (length a) (length (member 3 a))) 2

 

 

Tell me about...

(length list)

(list expression …)

(setq symbol1 statement1 [symbol2 statement2] ...)

LISP Compatibility

Programming Overview of LISP (LISt Processing) Language

 


Bricscad™ is commercialized by Bricsys NV. Bricsys NV and Vondle NV are fully owned subsidiaries of Menhirs NV. © 2001- Menhirs NV - All rights reserved.