[Top][All Lists]

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

Re: Why aren't `find`, `find-if`, `remove-if` part of Emacs Lisp?

From: Pascal J. Bourguignon
Subject: Re: Why aren't `find`, `find-if`, `remove-if` part of Emacs Lisp?
Date: Wed, 18 Jun 2014 16:43:48 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Nicolas Petton <address@hidden> writes:

> Stefan Monnier <address@hidden> writes:
>>>>> Emacs Lisp is a great Lisp dialect, but I miss `find`, `find-if`,
>>>>> `remove-if`, etc. iteration functions a lot. Sure, I can require cl-lib
>>>>> or use dash, but I'm wondering why these functions are not part of the
>>>>> base language?
>>>> Not sure what you mean.  Most languages I know provide list operations
>>>> via libraries.  Why should Elisp be different?
>>> What I mean is that Elisp do not have `remove-if`
>> Of course it does, tho it calls it `cl-remove-if'.
> Yes, but what I meant was that there is no filtering function in Elisp
> itself (cl-remove-if is part of cl-lib).
> But Barry's answer explains it. Now I'm wondering if it would make sense
> to have such functions in Elisp itself?

Yes, it would makes sense.  And just name them find, find-if, remove-if!

(defun remove-if (&rest args) (apply (function cl-remove-if) args))
;; …

__Pascal Bourguignon__
"Le mercure monte ?  C'est le moment d'acheter !"

reply via email to

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