[ The ECLiPSe Libraries | Reference Manual | Alphabetic Index ]library(lists)
Predicates for list manipulation
Predicates
- 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.
- halve(+List, -Front, -Back)
- Split a list in the middle
- 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.
- print_list(+List)
- Print the elements of a list, one per line
- reverse(+List, ?Reversed)
- Succeeds if Reversed is the reversed list List.
- shuffle(+List, -ShuffledList)
- Shuffle a list, ie randomize the element order
- splice(?Odds, ?Evens, ?List)
- Merge two lists by interleaving the elements
- 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.
Reexports
About
- Copyright © Imperial College London and ICL
- Date: $Date: 2004/04/22 15:04:30 $
Generated from lists.eci on Sat Aug 7 01:44:24 2004