11.3.128 nonmember/2

Synopsis

nonmember(?Element, ?List)

is true if the given Element does not occur in the given List. Its purpose is to test for membership. Normally, the two arguments are ground.

Arguments

Element
term
List
list of term

Description

In the context of this predicate, a term occurs in a list if it can be unified with an element of the list.

Backtracking

The predicate is determinate and either succeeds or fails. It never binds variables.

Examples

     
     | ?- nonmember(bar, [foo,bar,baz]).
     no

See Also

ref-lte-acl, library(lists).


Send feedback on this subject.