'(a b c d), how would I remove
c to end up with
'(a d)? Is there a "right" way to remove multiple, distinct elements from a list?
Obviously, one could do
(delete 'c (delete 'b '(a b c d))). But this doesn't generalize or scale well1.
Other possibilities include:
Create a predicate function and map it over the list with something like
Perform a set difference (if that's even different from the list mapping)
I am getting lost in all the different implementations which accomplish, so it seems, the same thing (i.e.
I would prefer to only use whatever ships with vanilla Emacs (26.3), unless there is a compelling reason to introduce an external dependency.
1 I understand the distinction between
delete in that one preserves the original list while the other does not. It's my impression that the two are more or less interchangeable otherwise.