remove/3

Removes an element from a list:

remove(Term,List,RestList) -(i,i,o),(o,i,i),(o,i,o)

?Term <term>

?List <list> or <variable>

?Rest <list> or <variable>

Compatibility: LPA Win-Prolog.

Remarks:

1) This predicate succeeds when its first argument is bound to a Term that is an element in a particular List, and Rest is bound to another list that contains all the elements of List except for Term. Either of the last two arguments may be fully or partially instantiated lists, or simply variables; remove/3 can backtrack to generate alternative solutions where appropriate.