Did you know ... Search Documentation:
Pack pac -- prolog/pac/basic.pl
PublicShow source
 iterated_deepening(G:pred, +D:int, +N:int, -R) is nondet
Iterate at most N times call_with_depth_limit(G, D, R), incrementing D to twice larger for each iteration step.
 completing_options(+X:list, +Y:list, -Z:list) is det
Update options list Y with X to Z.
 if(+X, +Y, +Z) is nondet
Meta predicate for conditional senteces.
 prepend(?A, -X, -Y) is det
roughly works like flatten(A, B), append(B, Y, X).
 verbatim_skip(+X, +Y, +A, -B) is det
B is unified so that append([X, _, Y, B], A). Intended use is to skip a long comment like /* ... */ in TeX with X=`/*`, Y=`/*`.
 smash(+X:text) is det
Write all elements of text to the standard output ignoring the null byte code.
 smash(+X:text, -Y:string) is det
Same as smash/1, but unify Y with the output string instead.
 smash_codes(+X:text, -Y:codes) is det
Same as smash/2, but unify Y with the output codes instead.
 zip(?X:list, ?Y:list, ?Z:list) is det
Zip X and Y into Z with comma (,). ?- zip([a,b],[x,y], R), zip(A, X, R).

Re-exported predicates

The following predicates are exported from this file while their implementation is defined in imported modules or non-module files loaded by this module.

 comma_list(?CommaList, ?List)
 semicolon_list(?SemicolonList, ?List)
True if CommaList is a nested term over the ','/2 (';'/2) functor and List is a list expressing the elements of the conjunction. The predicate is deterministic if at least CommaList or List is sufficiently instantiated. If both are partial structures it enumerates ever growing conjunctions and lists. CommaList may be left or right associative on input. When generated, the CommaList is always right associative.

This predicate is typically used to reason about Prolog conjunctions (disjunctions) as many operations are easier on lists than on binary trees over some operator.

Undocumented predicates

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

 max(Arg1, Arg2, Arg3)
 min(Arg1, Arg2, Arg3)
 max_of_list(Arg1, Arg2)
 min_of_list(Arg1, Arg2)
 ahead_compare(Arg1, Arg2, Arg3, Arg4)
 associative_comma(Arg1, Arg2, Arg3)
 kleene_star(Arg1, Arg2, Arg3)
 kleene_star_greedy(Arg1, Arg2, Arg3)
 kleene_plus_greedy(Arg1, Arg2, Arg3)
 kleene_string_codes(Arg1, Arg2, Arg3)
 term_codes(Arg1, Arg2)
 term_codes(Arg1, Arg2, Arg3)
 concat(Arg1, Arg2)
 flatten(Arg1, Arg2, Arg3)
 pipe_create(Arg1, Arg2)
 pipe_create(Arg1, Arg2, Arg3)
 pipe_to_obj(Arg1, Arg2)
 obj_to_pipe(Arg1, Arg2)
 assocq(Arg1, Arg2, Arg3)
 memq(Arg1, Arg2)
 clear(Arg1, Arg2)
 clear(Arg1, Arg2, Arg3)
 collect(Arg1, Arg2, Arg3)
 current(Arg1, Arg2, Arg3)
 env(Arg1, Arg2, Arg3)
 herbrand(Arg1, Arg2)
 herbrand(Arg1, Arg2, Arg3)
 herbrand(Arg1, Arg2, Arg3, Arg4)
 herbrand0(Arg1, Arg2)
 herbrand_in_context(Arg1, Arg2)
 herbrand_in_context(Arg1, Arg2, Arg3)
 id(Arg1, Arg2)
 if(Arg1, Arg2)
 listcast(Arg1, Arg2)
 listsubst(Arg1, Arg2, Arg3)
 ordered_pair(Arg1, Arg2, Arg3)
 paragraph(Arg1, Arg2)
 listp(Arg1)
 peek(Arg1, Arg2, Arg3)
 peek(Arg1, Arg2, Arg3, Arg4)
 remove(Arg1, Arg2, Arg3)
 remove_last(Arg1, Arg2, Arg3)
 smash_string(Arg1, Arg2)
 term_string0(Arg1, Arg2)
 pred_term_smash(Arg1, Arg2, Arg3)
 term_smash(Arg1, Arg2)
 term_smash0(Arg1, Arg2)
 fst(Arg1, Arg2)
 fst(Arg1, Arg2, Arg3)
 snd(Arg1, Arg2)
 snd(Arg1, Arg2, Arg3)
 split(Arg1, Arg2)
 split(Arg1, Arg2, Arg3)
 split(Arg1, Arg2, Arg3, Arg4)
 split(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6)
 split_rest(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6)
 stack_init
 split_string_by_word(Arg1, Arg2, Arg3)
 scan_prefix(Arg1, Arg2, Arg3, Arg4)
 scan_prefix(Arg1, Arg2, Arg3, Arg4, Arg5)
 remove_comment(Arg1, Arg2)
 remove_comment(Arg1, Arg2, Arg3)
 bi_reverse(Arg1, Arg2, Arg3)
 stack_pop(Arg1, Arg2)
 stack_push(Arg1)
 stack_push(Arg1, Arg2)
 stack_top(Arg1)
 stack_top(Arg1, Arg2)
 stack_update(Arg1)
 residue(Arg1, Arg2, Arg3)
 stack_update(Arg1, Arg2)
 union(Arg1, Arg2)
 flatten_dl(Arg1, Arg2, Arg3)
 herbrand_opp(Arg1, Arg2)
 herbrand_opp(Arg1, Arg2, Arg3)
 variant(Arg1, Arg2, Arg3, Arg4)
 cons(Arg1, Arg2, Arg3)