I’m using lists:filter/2, and my predicate has a number of clauses. Then I want to invert the sense of the predicate.
Elixir’s got Enum.reject/2. Would Erlang be improved by having the same?
Alternatives considered; I like neither:
lists:partition/2in both cases – can just match the other element in the tuple.- Adding a local
invert(or similar) function to wrap the predicate, reversing the sense.