[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: member
From: |
Emanuel Berg |
Subject: |
Re: member |
Date: |
Fri, 04 Sep 2015 02:24:35 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) |
"Pascal J. Bourguignon" <pjb@informatimago.com>
writes:
> If you just want a more concise result
I'm fine using `member' as a "false predicate", and
I don't think it is bad or that it should be changed.
> you can use position or find instead of member.
> As predicates, they're equivalent.
`find' seems to be the same and thus better than `car'
+ member. `position' is good when what should be
determined is the... position of the item.
(find 2 '(1 2 3 4)) ; 2
(find 6 '(1 2 3 4 5)) ; nil
(position 1 '(1 2 3 4)) ; 0 (zero-indexed; N.B. (when 0 t) ; t)
(position 6 '(1 2 3 4 5)) ; nil
--
underground experts united
http://user.it.uu.se/~embe8573
- RE: member returns list, (continued)
- member (was: Re: To `boundp' or not to `boundp'?), Emanuel Berg, 2015/09/01
- Message not available
- Re: member returns list (was: Re: To `boundp' or not to `boundp'?), Barry Margolin, 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 (was: Re: To `boundp' or not to `boundp'?), Barry Margolin, 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, Pascal J. Bourguignon, 2015/09/03
- Re: member,
Emanuel Berg <=
Re: To `boundp' or not to `boundp'?, Stefan Monnier, 2015/09/01