Subject: Re: Please refresh my memory

From: "Richard A. O'Keefe" <[email-masked]>
Date: Fri, 7 Apr 2000 17:20:52 +1200 (NZST)

I just started with prolog after a far too long break,
	and now I don't remember how to create facts.

Do read the SWI Prolog documentation, you _will_ find it useful.

To add a single clause to the data base "manually", do
	assert(TheClause)
e.g.
	?- assert(app([], L, L)).
	?- assert((app([H|T], L, [H|R]) :- app(T, L, R)).
To add clauses from within a program, assert/1 is the way to go.
If you want to add clauses from the keyboard, the easy way is to
consult the pseudo-file 'user'.

	?- [user].
	app([], L, L).
	app([H|T], L, [H|R]) :- app(T, L, R).
	end_of_file.

(The last line is to be read as literally as the ones preceding.)