I need to unify all terms in database to one variable.
For given code:
man('a').
man('b').
main :-
prompt(_, ''),
man(X),
write(X),
nl,
halt.
I get output:
a
I need to get something like:
['a','b']
Is it possible? I know about retract/1, which deletes the term from database, I could iterate trough all theese facts and retract them from database one by one, but that seems to be like shoting in the leg. Any given advice is apreciated.