Next:  Sorts Library predicates 
Up:  The Built-in Predicates 
 Previous:  Operating System Built-Ins
 
 
 ECLiPSe
  provides a library of list manipulation predicates. These are
provided in the prolog library file  lists.pl. This library is autoloaded
when one of the predicates is first used. 
 
 
 ECLiPSe
  Lists Library predicate.
-  append(?List1, ?List2, ?List3)
 -  
 
Succeeds if  List3 is the result of appending  List2 to  List1.
 
 -  checklist(+Pred, +List)
 -  
 
Succeeds if  Pred(Elem) succeeds for every element of  List. 
 
 -  delete(?Element, ?List1, ?List2)
 -  
 
Succeeds if  List2 is  List1 less an occurence of  Element in  List1.
 
 -  flatten(+NestedList, ?FlatList)
 -  
 
Succeeds if  FlatList is the list of all elements in  NestedList, as found in a left-to-right, depth-first traversal of  NestedList.
 
 -  intersection(+List1, +List2, ?Common)
 -  
 
Succeeds if  Common unifies with the list which contains the common elements of  List1 and  List2.
 
 -  length(?List, ?N)
 -  
 
Succeeds if the length of list  List is  N.
 
 -  maplist(+Pred, ?OldList, ?NewList)
 -  
 
Succeeds if  Pred(Old, New) succeeds for corresponding pairs of elements from  OldList and  NewList. 
 
 -  member(?Term, ?List)
 -  
 
Succeeds if  Term unifies with a member of the list  List.
 
 -  memberchk(+Term, ?List)
 -  
 
Succeeds if  Term is a member of the list  List.
 
 -  nonmember(+Element, +List)
 -  
 
Succeeds if  Element is not an element of the list  List.
 
 -  subset(?SubList, +List)
 -  
 
Succeeds if  List is the list which contains all elements from  SubList in the same order as in  SubList.
 
 -  subtract(+List1, +List2, ?Remainder)
 -  
 
Succeeds if  Remainder is the list which contains those elements of  List1 which are not in  List2.
 
 -  union(+List1, +List2, ?Union)
 -  
 
Succeeds if  Union is the list which contains the union of elements in  List1 and those in  List2.
 
 
 
 
   
   
      
   
 Next:  Sorts Library predicates 
Up:  The Built-in Predicates 
 Previous:  Operating System Built-Ins
 
 
 
Micha Meier 
Mon Mar  4 12:11:45 MET 1996