[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
member returns list (was: Re: To `boundp' or not to `boundp'?)
From: |
Emanuel Berg |
Subject: |
member returns list (was: Re: To `boundp' or not to `boundp'?) |
Date: |
Wed, 02 Sep 2015 01:37:56 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) |
Barry Margolin <barmar@alum.mit.edu> writes:
> ... MEMBER, which intuitively seems like it would
> just return a boolean, but actually returns the tail
> of the list where the element was found.
Yes, and I have wondered about that. Is it useful,
perhaps with the use of `car' (?) as in:
(car (member 2 '(1 2 3))) ; 2
(car (member 0 '(1 2 3))) ; nil
Or is it some "leftover optimization" thing where
`cdr' is faster than returning `t', and can be used
the same way?
Or is it something else?
--
underground experts united
http://user.it.uu.se/~embe8573
- To `boundp' or not to `boundp'?, Alexander Shukaev, 2015/09/01
- Re: To `boundp' or not to `boundp'?, Dmitry Gutov, 2015/09/01
- Message not available
- Re: To `boundp' or not to `boundp'?, Barry Margolin, 2015/09/01
- RE: To `boundp' or not to `boundp'?, Drew Adams, 2015/09/01
- member returns list (was: Re: To `boundp' or not to `boundp'?),
Emanuel Berg <=
- RE: member returns list (was: Re: To `boundp' or not to `boundp'?), Drew Adams, 2015/09/01
- Re: member returns list (was: Re: To `boundp' or not to `boundp'?), Emanuel Berg, 2015/09/01
- RE: member returns list (was: Re: To `boundp' or not to `boundp'?), Drew Adams, 2015/09/01
- Re: member returns list (was: Re: To `boundp' or not to `boundp'?), Emanuel Berg, 2015/09/01
- RE: member returns list (was: Re: To `boundp' or not to `boundp'?), Drew Adams, 2015/09/02
- Re: member returns list (was: Re: To `boundp' or not to `boundp'?), Emanuel Berg, 2015/09/02
- Message not available
- Re: member returns list, Pascal J. Bourguignon, 2015/09/03
- Re: member returns list, Emanuel Berg, 2015/09/03
- Re: member returns list, Michael Heerdegen, 2015/09/02
- Re: member returns list, Emanuel Berg, 2015/09/02