protocol
varlistp
ï
List of variables protocol.
logtalk_load(types(loader))
static
Public predicatesï
append/3
ï
Appends two lists.
static
append(List1,List2,List)
append(?list,?list,?list)
- zero_or_more
delete/3
ï
Deletes from a list all occurrences of an element returning the list of remaining elements.
static
delete(List,Element,Remaining)
delete(@list,@term,?list)
- one
empty/1
ï
True if the argument is an empty list.
static
empty(List)
empty(@list)
- zero_or_one
flatten/2
ï
Flattens a list of lists into a list.
static
flatten(List,Flatted)
flatten(@list,-list)
- one
last/2
ï
List last element (if it exists).
static
last(List,Last)
last(@list,@var)
- zero_or_one
length/2
ï
List length.
static
length(List,Length)
length(@list,?integer)
- zero_or_one
memberchk/2
ï
Checks if a variable is a member of a list.
static
memberchk(Element,List)
memberchk(@var,@list)
- zero_or_one
nextto/3
ï
X
and Y
are consecutive elements in List.
static
nextto(X,Y,List)
nextto(@var,@var,?list)
- zero_or_more
nth0/3
ï
Nth element of a list (counting from zero).
static
nth0(Nth,List,Element)
nth0(?integer,+list,@var)
- zero_or_more
nth0/4
ï
Nth element of a list (counting from zero). Rest
is a list of all the other elements. Can be used to either select the nth element of List
or to insert an element before the nth element in Rest
.
static
nth0(Nth,List,Element,Rest)
nth0(?integer,+list,@var,?list)
- zero_or_more
nth1/3
ï
Nth element of a list (counting from one).
static
nth1(Nth,List,Element)
nth1(?integer,+list,@var)
- zero_or_more
nth1/4
ï
Nth element of a list (counting from zero). Rest
is a list of all the other elements. Can be used to either select the nth element of List
or to insert an element before the nth element in Rest
.
static
nth1(Nth,List,Element,Rest)
nth1(?integer,+list,@var,?list)
- zero_or_more
permutation/2
ï
The two lists are a permutation of the same list.
static
permutation(List,Permutation)
permutation(@list,@list)
- zero_or_one
prefix/2
ï
Prefix
is a prefix of List
.
static
prefix(Prefix,List)
prefix(?list,@list)
- zero_or_more
remove_duplicates/2
ï
Removes duplicated variables and keeping the left-most variable when repeated.
static
remove_duplicates(List,Set)
remove_duplicates(+list,-list)
- one
reverse/2
ï
Reverses a list.
static
reverse(List,Reversed)
reverse(@list,?list)
- zero_or_one
reverse(?list,@list)
- zero_or_one
reverse(-list,-list)
- one_or_more
same_length/2
ï
The two lists have the same length.
static
same_length(List1,List2)
same_length(@list,?list)
- zero_or_one
same_length(?list,@list)
- zero_or_one
same_length(-list,-list)
- one_or_more
select/3
ï
Selects an element from a list, returning the list of remaining elements.
static
select(Element,List,Remaining)
select(@var,?list,?list)
- zero_or_more
sublist/2
ï
The first list is a sublist of the second.
static
sublist(Sublist,List)
sublist(?list,@list)
- zero_or_more
subtract/3
ï
Removes all elements in the second list from the first list, returning the list of remaining elements.
static
subtract(List,Elements,Remaining)
subtract(@list,@list,-list)
- one
suffix/2
ï
Suffix
is a suffix of List
.
static
suffix(Suffix,List)
suffix(?list,@list)
- zero_or_more
valid/1
ï
Term is a valid list of variables.
static
valid(Term)
valid(@nonvar)
- zero_or_one
check/1
ï
Checks if a term is a valid list of variables. Throws an exception if the term is not valid.
static
check(Term)
check(@nonvar)
- one
Protected predicatesï
(none)
Private predicatesï
(none)
Operatorsï
(none)
See also