findall! , Goal, Xlist):-
call Goal), %
assertzt queue (X)), \
fail; %
assertzt queue (bottom)), 6
collect [ Xlist). %
collect(L):-
retract! queue(X) ], I, %
(X == bottom,!, L = ?
L = [X I Rest], collect! Rest)), % .'.'
7.8. bagof powerset (Set, Subsets), ( ).
7.9. bagof copy_terre(Term, Copy)
, 1 ~ .
Prolog ,
,
Prolog.
, Prolog.
, .
var [ X). X () .
nonvarf X), - .
atom! X]. X .
integer [ X). X - ,
float (X). X - .
7.
atomic (X). X , .
compound [ X). X - .
, :
Term =.. [ Functor | ArgwmentList]
functor { Term, Functor, Arity) arg( H, Term, Argument)
name{ Atom, CharacterCodes)
.
X = Y. X Y .
X == Y. X Y .
X \= Y. X Y .
X =: = Y. X Y .
X =\= Y. X Y .
X < Y X Y ( -<:, >, >=).
X @< Y X Y ( @=<, 8>, >■=),
Prolog , .
assert < Clause). Clause .
assertaf Clause). .
assertz { Clause). .
retract (Clause). ,
Clause.
, , .
bagof (X, , L). L X, ?.
setof (X, , L), L X,
.
findall (X, , Lb bagof.
repeat , .
I. Prolog