|Did you know ...||Search Documentation:|
|apply.pl -- Apply predicates on a list|
This module defines meta-predicates that apply a predicate on all members of a list.
call(Pred, X)succeeds and Excluded contains the remaining elements.
call(Pred, Xi, Place), where Place must be unified to one of
>. Pred must be deterministic.
call(Goal, ElemIn, _)fails are omitted from ListOut. For example (using library(yall)):
?- convlist([X,Y]>>(integer(X), Y is X^2), [3, 5, 4.4, 2], L). L = [9, 25, 4].
foldl(P, [X11,...,X1n], ..., [Xm1,...,Xmn], V0, Vn) :- P(X11, ..., Xm1, V0, V1), ... P(X1n, ..., Xmn, V', Vn).
scanl(P, [X11,...,X1n], ..., [Xm1,...,Xmn], V0, [V0,V1,...,Vn]) :- P(X11, ..., Xm1, V0, V1), ... P(X1n, ..., Xmn, V', Vn).
The following predicates are exported, but not or incorrectly documented.