protocol
metap
ï
Useful meta-predicates protocol.
logtalk_load(meta(loader))
static
Public predicatesï
include/3
ï
Returns a list of all list elements that satisfy a predicate.
static
include(Closure,List,Included)
include(1,*,*)
include(+callable,+list,-list)
- one
exclude/3
ï
Returns a list of all list elements that fail to satisfy a predicate.
static
exclude(Closure,List,Excluded)
exclude(1,*,*)
exclude(+callable,+list,-list)
- one
findall_member/4
ï
Finds all members of a list that satisfy a given test.
static
findall_member(Member,List,Test,Result)
findall_member(*,*,0,*)
findall_member(@term,+list,@callable,-list)
- one
findall_member/5
ï
Finds all members of a list that satisfy a given test appending the given tail to the result.
static
findall_member(Member,List,Test,Result,Tail)
findall_member(*,*,0,*,*)
findall_member(@term,+list,@callable,-list,+list)
- one
partition/4
ï
Partition a list of elements in two lists using a predicate.
static
partition(Closure,List,Included,Excluded)
partition(1,*,*,*)
partition(+callable,+list,-list,-list)
- one
partition/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
.
static
partition(Closure,List,Value,Less,Equal,Greater)
partition(3,*,*,*,*,*)
partition(+callable,+list,@term,-list,-list,-list)
- one
fold_left/4
ï
List folding (left associative). Closure is extended with three arguments: accumulator, list element, and updated accumulator.
static
fold_left(Closure,Accumulator,List,Result)
fold_left(3,*,*,*)
fold_left(+callable,?term,+list,?term)
- zero_or_more
fold_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.
static
fold_left_1(Closure,List,Result)
fold_left_1(3,*,*)
fold_left_1(+callable,+list,?term)
- zero_or_more
scan_left/4
ï
List scanning (left associative). Closure is extended with three arguments: accumulator, list element, and updated accumulator.
static
scan_left(Closure,Accumulator,List,Results)
scan_left(3,*,*,*)
scan_left(+callable,?term,+list,?list)
- zero_or_more
scan_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.
static
scan_left_1(Closure,List,Results)
scan_left_1(3,*,*)
scan_left_1(+callable,+list,?list)
- zero_or_more
fold_right/4
ï
List folding (right associative). Closure is extended with three arguments: list element, accumulator, and updated accumulator.
static
fold_right(Closure,Accumulator,List,Result)
fold_right(3,*,*,*)
fold_right(+callable,?term,+list,?term)
- zero_or_more
fold_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.
static
fold_right_1(Closure,List,Result)
fold_right_1(3,*,*)
fold_right_1(+callable,+list,?term)
- zero_or_more
scan_right/4
ï
List scanning (right associative). Closure is extended with three arguments: list element, accumulator, and updated accumulator.
static
scan_right(Closure,Accumulator,List,Results)
scan_right(3,*,*,*)
scan_right(+callable,?term,+list,?list)
- zero_or_more
scan_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.
static
scan_right_1(Closure,List,Results)
scan_right_1(3,*,*)
scan_right_1(+callable,+list,?list)
- zero_or_more
map/2
ï
True if the predicate succeeds for each list element.
static
map(Closure,List)
map(1,*)
map(+callable,?list)
- zero_or_more
map/3
ï
List mapping predicate taken arguments from two lists of elements.
static
map(Closure,List1,List2)
map(2,*,*)
map(+callable,?list,?list)
- zero_or_more
map/4
ï
List mapping predicate taken arguments from three lists of elements.
static
map(Closure,List1,List2,List3)
map(3,*,*,*)
map(+callable,?list,?list,?list)
- zero_or_more
map/5
ï
List mapping predicate taken arguments from four lists of elements.
static
map(Closure,List1,List2,List3,List4)
map(4,*,*,*,*)
map(+callable,?list,?list,?list,?list)
- zero_or_more
map/6
ï
List mapping predicate taken arguments from five lists of elements.
static
map(Closure,List1,List2,List3,List4,List5)
map(5,*,*,*,*,*)
map(+callable,?list,?list,?list,?list,?list)
- zero_or_more
map/7
ï
List mapping predicate taken arguments from six lists of elements.
static
map(Closure,List1,List2,List3,List4,List5,List6)
map(6,*,*,*,*,*,*)
map(+callable,?list,?list,?list,?list,?list,?list)
- zero_or_more
map/8
ï
List mapping predicate taken arguments from seven lists of elements.
static
map(Closure,List1,List2,List3,List4,List5,List6,List7)
map(7,*,*,*,*,*,*,*)
map(+callable,?list,?list,?list,?list,?list,?list,?list)
- zero_or_more
map_reduce/5
ï
Map a list and apply a fold left (reduce) to the resulting list.
static
map_reduce(Map,Reduce,Accumulator,List,Result)
map_reduce(2,3,*,*,*)
map_reduce(+callable,+callable,+term,?list,?term)
- zero_or_more
Protected predicatesï
(none)
Private predicatesï
(none)
Operatorsï
(none)
See also