adds a term to the front of the database
asserta(Term)
asserta(Term) (i)
void(Term) (i) Term to be added to the database.
This is a standard prolog built-in. Asserta() adds Term to the beginning of the database. Term must should bound to an atom or a struct, but may contain free variables. The database entry is not removed upon backtracking. Database entries can only be removed by the use of the
retract () predicate.
asserta(hello), asserta(world), retract(X), write(X),nl, fail.
always succeeds. No runtime errors.
prolog-process, client-server, object
retractall , database , clause , listing