Is there a built in predicate that can be used to check if a variable name is in a list. Similar to member/2 but will compare the variable names with '=='?
Asked
Active
Viewed 33 times
0
-
1No there isn't. But writing such a predicate with `==/2` is just a few lines. – lurker Mar 17 '19 at 18:50
-
2There are no variable names. That is, they are discarded after reading in a term. For checking the occurrence of a variable in a list of variables see [this](https://stackoverflow.com/q/27389177/772868). – false Mar 17 '19 at 18:55
-
Why do you want to check if a variable name is in a list? Maybe, you could make other way to get what you want. – Rish Mar 18 '19 at 18:05