Did you know ... Search Documentation:
 Pack genutils -- prolog/data/pair.pl
is_pair(+X) is semidet
True if X is a pair.
pair(X:A, Y:B, Z:pair(A,B)) is det
dup(X:A, Y:pair(A,A)) is det
fst(X:pair(A,B), Y:A) is det
snd(X:pair(A,B), Y:B) is det
ffst(+P:pred(A,B), X:pair(A,C), Y:pair(B,C)) is det
ffst(+P:pred(A,B,S,S), X:pair(A,C), Y:pair(B,C), S1:S, S2:S) is det
Apply P to first element of pair. Two versions: one for normal use and another for use in DCG goals.
fsnd(+P:pred(B,C), X:pair(A,B), Y:pair(A,C)) is det
fsnd(+P:pred(B,C,S,S), X:pair(A,B), Y:pair(A,C), S1:S, S2:S) is det
Apply P to second element of pair. Two versions: one for normal use and another for use in DCG goals.
&(+F:pred(A,B), +G:pred(A,C), X:A, Y:pair(B,C)) is det
Apply F and G to X and pair results.
map_select_key_value(+P:pred(A,B), K:C, Y:B, L1:list(pair(C,A)), L2:list(pair(C,A))) is nondet
True when L2 is L1 with an element K-X removed, and P maps X to Y.
map_select_key_default_value(+P:pred(A,B), K:C, Z:B, Y:B, L1:list(pair(C,A)), L2:list(pair(C,A))) is det
If key K exists in pair list L1, extract value associated with it and apply P to get Y. Otherwise unify default Z with Y.
select_key_value(K:C, Y:B, L1:list(pair(C,A)), L2:list(pair(C,A))) is nondet
True when L2 is L1 with an element K-Y removed.
select_key_default_value(K:C, Z:B, Y:B, L1:list(pair(C,A)), L2:list(pair(C,A))) is det
If key K exists in pair list L1, extract value Y associated with it. Otherwise unify default Z with Y.

## Undocumented predicates

The following predicates are exported, but not or incorrectly documented.

ffst(Arg1, Arg2, Arg3, Arg4, Arg5)
fsnd(Arg1, Arg2, Arg3, Arg4, Arg5)