Delete/3 in library(lists) - deprecated?

Hi,
I noticed that delete/3 is tagged as deprecated. Are there plans to replace it? I couldn’t find any functor that is equivalent.
Thanks.

I think we should have an ISO committee to come up with a predicate naming convention to make such ambiguous (and short) predicate names unambiguous and elegant :grinning:

Maybe “delete_members_if_both_ground”, etc.

Gotta love the double negative in the source code (presumably to reduce garbage-collection activity).

Surely its arguments are in the wrong order anyway - should have the Element as the first argument, as with e.g. select/3

1 Like

Depending on what you need to do, select/3 and exclude/3 come to mind.

2 Likes

Oh wow, thank you! Didn’t know about library(apply). exclude/3 is what I need.

exclude(=(a),[a,b,a,c,d],L).
L = [b,c,d]
1 Like