listmember/2—verify that an element is included in a list
The listmember/2
function verifies that an element is included in a list. The syntax for this function is as follows:
listmember($LIST,$ELEM)
listmember/2 arguments
Argument | Mode | Type | Description |
---|---|---|---|
| Input | LIST_OF ANY | Specifies the list in which the presence of an element is to be verified |
| Input | ANY | Specifies the element to be searched for within the list |
Use the listmember/2
function to verify whether or not an element $ELEM
occurs in list $LIST
.
This primitive succeeds or fails depending on whether the element occurs in the list or not.
listmember/2 example
if ( listmember($E.mc_bad_slot_names,my_slot) ) ...
Was this page helpful? Yes No
Submitting...
Thank you
Comments
Log in or register to comment.