From: "Basil L. Contovounesios" <contovob@tcd.ie>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 44205@debbugs.gnu.org, Stefan Kangas <stefan@marxist.se>
Subject: bug#44205: [PATCH] Add new function seq-remove-item
Date: Tue, 27 Oct 2020 13:36:07 +0000 [thread overview]
Message-ID: <87v9evvliw.fsf@tcd.ie> (raw)
In-Reply-To: <87v9eybhcc.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 25 Oct 2020 13:49:55 +0100")
Lars Ingebrigtsen <larsi@gnus.org> writes:
> Stefan Kangas <stefan@marxist.se> writes:
>
>> I found myself reaching for a version of `seq-remove' where I don't have
>> to supply a lambda but can just give an item. Ergo, the attached.
>>
>> (seq-remove-item 2 '(1 2 3)) => (1 3)
>>
>> I find it a whole lot nicer than:
>>
>> (seq-remove (lambda (a) (= a 2)) '(1 2 3)) => (1 3)
>
> Isn't this just
>
> (remove 2 '(1 2 3)) => (1 3)
>
> though? I don't think seq.el needs to replicate the basic list
> functions...
I think the idea is that seq.el functions are generic and can thus be
extended to work with e.g. streams[1].
[1]: http://elpa.gnu.org/packages/stream.html
--
Basil
next prev parent reply other threads:[~2020-10-27 13:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-25 0:52 bug#44205: [PATCH] Add new function seq-remove-item Stefan Kangas
2020-10-25 12:49 ` Lars Ingebrigtsen
2020-10-27 13:36 ` Basil L. Contovounesios [this message]
2020-11-13 0:07 ` Stefan Kangas
2020-11-18 17:17 ` Stefan Kangas
2020-10-25 16:25 ` Unknown
2020-10-25 19:12 ` Juri Linkov
2020-10-27 13:45 ` Basil L. Contovounesios
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87v9evvliw.fsf@tcd.ie \
--to=contovob@tcd.ie \
--cc=44205@debbugs.gnu.org \
--cc=larsi@gnus.org \
--cc=stefan@marxist.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.