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

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

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


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

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

> It's no more misleading than MEMBER, which
> intuitively seems like it would just return
> a boolean, but actually returns the tail of the list
> where the element was found.

I guess one can do something like this. But probably
it will only lead to even more confusion.

    (defun memberp (e l)
      (when (member e l) t) )

    (memberp 1 '(1 2 3 4)) ; t
    (memberp 0 '(1 2 3 4)) ; nil

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




reply via email to

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