List Predicates in the Prolog Library

List Manipulation Predicates.

The following list manipulation routines are available once included with the use_module(library(lists)) command.

Functions:

1. *** prolog::identical_member(?Element, ?Set) is nondet%% identical_member holds true when Set is a list*:

1. *** prolog::append(? Lists,? Combined) %% Concatenate a list of lists. Is true if Lists is a list of% lists*:

1. *** prolog::nt/0(?N,+List, ?Elem) %is true when Elem is the Nth member of List*:

1. counting the first as prolog::element(That is, throw away the first% N elements and unify Elem with the next.) It can only be used to% select a particular element given the list and index. For that% task it is more efficient than nmember.% nth(+N:

Var:

1. counting the first as prolog::List:

1. counting the first as Elem is the same as prolog::nt/0:

1. counting the first as Elem is the same as except that it counts prolog::from: