- See also
- - https://sicstus.sics.se/sicstus/docs/3.12.11/html/sicstus/Lists.html
- To be done
- - This library is incomplete.
As of SICStus 3.12.11, the following predicates are missing:
substitute(+OldElem, +List, +NewElem, -NewList) is det- NewList is List with all values that are identical (==) to OldElem
replaced by NewElem.
nth(?Index, ?List, ?Element) is nondet- True if Element is the N-th element in List. Counting starts at
1.
- deprecated
- - use nth1/3.
nth(?Index, ?List, ?Element, ?Rest) is nondet- True if Element is the N-th element in List and Rest is the
remainder (as if by select/3) of List. Counting starts at 1.
- deprecated
- - use nth1/4.
same_length(?List1, ?List2, ?Length) is nondet- True if List1 and List2 both have length Length.
sublist(?Sub, +List)- True when all members of Sub are members of List in the same
order.
- Compatibility
- - sicstus. The order of generating sublists differs.
- - This predicate is known in many Prolog implementations,
but the semantics differ. E.g. In YAP it is a continuous
sub-list.
suffix(?Suffix, ?List) is nondet- True if Suffix is a suffix of List. Not the same as suffix/2
in SICStus 4 - the arguments are reversed!
Undocumented predicates
The following predicates are exported, but not or incorrectly documented.
- is_list(Arg1)
nth0(Arg1, Arg2, Arg3)
nextto(Arg1, Arg2, Arg3)
delete(Arg1, Arg2, Arg3)
nth0(Arg1, Arg2, Arg3, Arg4)
- memberchk(Arg1, Arg2)
select(Arg1, Arg2, Arg3)
append(Arg1, Arg2, Arg3)
prefix(Arg1, Arg2)
member(Arg1, Arg2)
min_list(Arg1, Arg2)
max_list(Arg1, Arg2)
sum_list(Arg1, Arg2)
permutation(Arg1, Arg2)
reverse(Arg1, Arg2)
same_length(Arg1, Arg2)
last(Arg1, Arg2)