[Next] 
[Up] 
[Previous] 
[Contents]  
 Next: Option
 Up: Libraries
 Previous: Base
     Contents 
The list namespace includes several common list-manipulating predicates.
- pred append ([A],[A],[A])
mode append (in,in,out)
mode append (out,out,in)
Holds if the third argument is the result of appending the first two arguments.
 
- pred mem(A,[A])
mode mem(out,in)
Holds if the first element is an element of the second.
 
- pred concat([[A]],[A])
mode concat(in,out)
Holds if the second list is the result of concatenating all the elements of 
the first list.
 
- pred remove(A,[A],[A])
mode remove(in,in,out)
Removes all occurrences of the first argument from the second and returns the result as the third.
 
- pred reverse([A],[A])
mode reverse(in,out)
Holds if the first list is the reverse of the second (and vice versa).
 
James Cheney
2003-10-23