help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: member returns list (was: Re: To `boundp' or not to `boundp'?)


From: Emanuel Berg
Subject: Re: member returns list (was: Re: To `boundp' or not to `boundp'?)
Date: Wed, 02 Sep 2015 23:35:30 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Barry Margolin <barmar@alum.mit.edu> writes:

> It could be useful for something like
>
> (length (member item list))
>
> Or it could be used in a loop, where you repeat the
> operation with the list that it returned.

Yes, I understand it can be used in many situations.
The sky is the limit. What I thought, I thought it was
either an "inverted optimization" (i.e., the
optimization is not to make it intuitive but leave it
as it is which is faster and works the same) *or* if
there was one (1), or but a few cases where it is very
useful, simple combinations like the 1-2 of boxing or
one-timer in ice hockey, that would be interesting
to see.

We can compare it to something else and you will
understand immediately what I mean: `or' is
intuitively a boolean, but in practice it is a boolean
AND the item which was first found to be true,
returned. I.e., it is just like `member' in that
sense. However, with `or' if anyone asked the question
I asked about `member', I would answer without
blinking, because then you can do

    (or title "The boring standard title that should never appear")

The examples provided hasn't been as straightforward
as that, at least not to me, but it is OK. They don't
have to be.

-- 
underground experts united
http://user.it.uu.se/~embe8573




reply via email to

[Prev in Thread] Current Thread [Next in Thread]