collects all clauses of dynamic tuples....
Move to
Next Prev
Up Top
See also
abolish/1
asserta/1
assertz/1
collect/3
load/1
unload/1
loaded/1/2
retract/1
retractall/1
IF Computer > MINERVA > Manual > Reference > Predicates > Clause creation and destruction > collect/3

collect/3

collects all clauses of dynamic tuples.

collect(+Term, +Tuple, -TermList)

collect/3 is a special purpose predicate for collecting all clauses of a dynamic predicate (all clauses must be facts, i.e. of the form (Head :- true). It's behaviour is like that of findall3. However, its optimized for the special purpose to collect clauses of dynamic predicates.
collect/3 unifies TermList with a list with as many instantiations of Term as Tuple has solutions of Term.
If Tuple does not succeed then TermList will be unified with the emtpy list.

Arguments

Term                term
Tuple               fact
TermList            list of terms

Examples

assertz(employee(meyer)).
assertz(employee(warren)).
collect(X, employee(X), L). Succeeds with substitution L <- [meyer, warren].

Standard

This predicate is not part of the ISO-Prolog Standard.

See also

asserta/1, assertz/1, abolish/1, load/1, unload/1, loaded/1/2, retract/1, retractall/1, findall/3.

read on...
MINERVA
ifcomputer logo
f
Expert Services on the Web
Language
English
Japanese
Server
USA
Japan
Site Access
Local Index
Local Contents
Site Contents
Site Index
Printer Friendly
For imode
For PDA
Search
document: http://www.ifcomputer.co.jp/MINERVA/Manual/Reference/Predicates/clause_creat_destruct/collect/home_en.html
published 2008/7/21 update 2003/2/26 (c) 1996-2006 IF Computer Japan
IF Computer 5-28-2 Sendagi, Bunkyo-ku Tel +81-3-5814-3352 info@ifcomputer.com
Customer Support Tokyo 113-0022 Japan   http://www.ifcomputer.com
scroll to top managed with ubiCMS