[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Is there equivalent internal function for this list-has-elements?
From: |
Joost Kremers |
Subject: |
Re: Is there equivalent internal function for this list-has-elements? |
Date: |
Sun, 18 Oct 2020 23:21:05 +0200 |
User-agent: |
mu4e 1.5.5; emacs 27.1.50 |
On Sun, Oct 18 2020, tomas@tuxteam.de wrote:
> If I understand this one correctly, it can be expressed as:
>
> (seq-filter
> (lambda (elt) (string-match needle elt))
> haystack)
Small nit-pick, but it's generally better to use `string-match-p` if you're just
testing whether a string matches a regexp. `string-match` modifies the match
data, `string-match-p` doesn't.
--
Joost Kremers
Life has its moments