Answers for "prolog assert"

2

prolog assert

% inserts a fact into the database
% deprecated
assert(+Term).

% inserts a fact in the beginning of the database
asserta(+Term).

% inserts a fact in the end of the database
assertz(+Term).

% example
asserta(macaco('gorila')).
Posted by: Guest on November-14-2020

Browse Popular Code Answers by Language