protocol
metap
Useful meta-predicates protocol.
logtalk_load(meta(loader))staticPublic predicates
include/3
Returns a list of all list elements that satisfy a predicate.
staticinclude(Closure,List,Included)include(1,*,*)include(+callable,+list,-list) - oneexclude/3
Returns a list of all list elements that fail to satisfy a predicate.
staticexclude(Closure,List,Excluded)exclude(1,*,*)exclude(+callable,+list,-list) - onefindall_member/4
Finds all members of a list that satisfy a given test.
staticfindall_member(Member,List,Test,Result)findall_member(*,*,0,*)findall_member(@term,+list,@callable,-list) - onefindall_member/5
Finds all members of a list that satisfy a given test appending the given tail to the result.
staticfindall_member(Member,List,Test,Result,Tail)findall_member(*,*,0,*,*)findall_member(@term,+list,@callable,-list,+list) - onepartition/4
Partition a list of elements in two lists using a predicate.
staticpartition(Closure,List,Included,Excluded)partition(1,*,*,*)partition(+callable,+list,-list,-list) - onepartition/6
Partitions a list in lists with values less, equal, and greater than a given value using a comparison predicate with the same argument order as compare/3.
staticpartition(Closure,List,Value,Less,Equal,Greater)partition(3,*,*,*,*,*)partition(+callable,+list,@term,-list,-list,-list) - onefold_left/4
List folding (left associative). Closure is extended with three arguments: accumulator, list element, and updated accumulator.
staticfold_left(Closure,Accumulator,List,Result)fold_left(3,*,*,*)fold_left(+callable,?term,+list,?term) - zero_or_morefold_left_1/3
List folding (left associative). Closure is extended with three arguments: accumulator, list element, and updated accumulator. The initial value of the accumulator is the list first element. Fails for empty lists.
staticfold_left_1(Closure,List,Result)fold_left_1(3,*,*)fold_left_1(+callable,+list,?term) - zero_or_morescan_left/4
List scanning (left associative). Closure is extended with three arguments: accumulator, list element, and updated accumulator.
staticscan_left(Closure,Accumulator,List,Results)scan_left(3,*,*,*)scan_left(+callable,?term,+list,?list) - zero_or_morescan_left_1/3
List scanning (left associative). Closure is extended with three arguments: accumulator, list element, and updated accumulator. The accumulator is initialized with the list first element. Fails for empty lists.
staticscan_left_1(Closure,List,Results)scan_left_1(3,*,*)scan_left_1(+callable,+list,?list) - zero_or_morefold_right/4
List folding (right associative). Closure is extended with three arguments: list element, accumulator, and updated accumulator.
staticfold_right(Closure,Accumulator,List,Result)fold_right(3,*,*,*)fold_right(+callable,?term,+list,?term) - zero_or_morefold_right_1/3
List folding (right associative). Closure is extended with three arguments: list element, accumulator, and updated accumulator. The initial value of the accumulator is the list first element. Fails for empty lists.
staticfold_right_1(Closure,List,Result)fold_right_1(3,*,*)fold_right_1(+callable,+list,?term) - zero_or_morescan_right/4
List scanning (right associative). Closure is extended with three arguments: list element, accumulator, and updated accumulator.
staticscan_right(Closure,Accumulator,List,Results)scan_right(3,*,*,*)scan_right(+callable,?term,+list,?list) - zero_or_morescan_right_1/3
List scanning (right associative). Closure is extended with three arguments: list element, accumulator, and updated accumulator. The accumulator is initialized with the list first element. Fails for empty lists.
staticscan_right_1(Closure,List,Results)scan_right_1(3,*,*)scan_right_1(+callable,+list,?list) - zero_or_moremap/2
True if the predicate succeeds for each list element.
staticmap(Closure,List)map(1,*)map(+callable,?list) - zero_or_moremap/3
List mapping predicate taken arguments from two lists of elements.
staticmap(Closure,List1,List2)map(2,*,*)map(+callable,?list,?list) - zero_or_moremap/4
List mapping predicate taken arguments from three lists of elements.
staticmap(Closure,List1,List2,List3)map(3,*,*,*)map(+callable,?list,?list,?list) - zero_or_moremap/5
List mapping predicate taken arguments from four lists of elements.
staticmap(Closure,List1,List2,List3,List4)map(4,*,*,*,*)map(+callable,?list,?list,?list,?list) - zero_or_moremap/6
List mapping predicate taken arguments from five lists of elements.
staticmap(Closure,List1,List2,List3,List4,List5)map(5,*,*,*,*,*)map(+callable,?list,?list,?list,?list,?list) - zero_or_moremap/7
List mapping predicate taken arguments from six lists of elements.
staticmap(Closure,List1,List2,List3,List4,List5,List6)map(6,*,*,*,*,*,*)map(+callable,?list,?list,?list,?list,?list,?list) - zero_or_moremap/8
List mapping predicate taken arguments from seven lists of elements.
staticmap(Closure,List1,List2,List3,List4,List5,List6,List7)map(7,*,*,*,*,*,*,*)map(+callable,?list,?list,?list,?list,?list,?list,?list) - zero_or_moremap_reduce/5
Map a list and apply a fold left (reduce) to the resulting list.
staticmap_reduce(Map,Reduce,Accumulator,List,Result)map_reduce(2,3,*,*,*)map_reduce(+callable,+callable,+term,?list,?term) - zero_or_moreProtected predicates
(none)
Private predicates
(none)
Operators
(none)
See also