protocol
varlistpï
List of variables protocol.
logtalk_load(types(loader))staticPublic predicatesï
append/3ï
Appends two lists.
staticappend(List1,List2,List)append(?list,?list,?list) - zero_or_moredelete/3ï
Deletes from a list all occurrences of an element returning the list of remaining elements.
staticdelete(List,Element,Remaining)delete(@list,@term,?list) - oneempty/1ï
True if the argument is an empty list.
staticempty(List)empty(@list) - zero_or_oneflatten/2ï
Flattens a list of lists into a list.
staticflatten(List,Flatted)flatten(@list,-list) - onelast/2ï
List last element (if it exists).
staticlast(List,Last)last(@list,@var) - zero_or_onelength/2ï
List length.
staticlength(List,Length)length(@list,?integer) - zero_or_onememberchk/2ï
Checks if a variable is a member of a list.
staticmemberchk(Element,List)memberchk(@var,@list) - zero_or_onenextto/3ï
X and Y are consecutive elements in List.
staticnextto(X,Y,List)nextto(@var,@var,?list) - zero_or_morenth0/3ï
Nth element of a list (counting from zero).
staticnth0(Nth,List,Element)nth0(?integer,+list,@var) - zero_or_morenth0/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.
staticnth0(Nth,List,Element,Rest)nth0(?integer,+list,@var,?list) - zero_or_morenth1/3ï
Nth element of a list (counting from one).
staticnth1(Nth,List,Element)nth1(?integer,+list,@var) - zero_or_morenth1/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.
staticnth1(Nth,List,Element,Rest)nth1(?integer,+list,@var,?list) - zero_or_morepermutation/2ï
The two lists are a permutation of the same list.
staticpermutation(List,Permutation)permutation(@list,@list) - zero_or_oneprefix/2ï
Prefix is a prefix of List.
staticprefix(Prefix,List)prefix(?list,@list) - zero_or_moreremove_duplicates/2ï
Removes duplicated variables and keeping the left-most variable when repeated.
staticremove_duplicates(List,Set)remove_duplicates(+list,-list) - onereverse/2ï
Reverses a list.
staticreverse(List,Reversed)reverse(@list,?list) - zero_or_onereverse(?list,@list) - zero_or_onereverse(-list,-list) - one_or_moresame_length/2ï
The two lists have the same length.
staticsame_length(List1,List2)same_length(@list,?list) - zero_or_onesame_length(?list,@list) - zero_or_onesame_length(-list,-list) - one_or_moreselect/3ï
Selects an element from a list, returning the list of remaining elements.
staticselect(Element,List,Remaining)select(@var,?list,?list) - zero_or_moresublist/2ï
The first list is a sublist of the second.
staticsublist(Sublist,List)sublist(?list,@list) - zero_or_moresubtract/3ï
Removes all elements in the second list from the first list, returning the list of remaining elements.
staticsubtract(List,Elements,Remaining)subtract(@list,@list,-list) - onesuffix/2ï
Suffix is a suffix of List.
staticsuffix(Suffix,List)suffix(?list,@list) - zero_or_morevalid/1ï
Term is a valid list of variables.
staticvalid(Term)valid(@nonvar) - zero_or_onecheck/1ï
Checks if a term is a valid list of variables. Throws an exception if the term is not valid.
staticcheck(Term)check(@nonvar) - oneProtected predicatesï
(none)
Private predicatesï
(none)
Operatorsï
(none)
See also