From ok@atlas.otago.ac.nz  Fri Apr  7 07:20:39 2000
Received: from atlas.otago.ac.nz (atlas.otago.ac.nz [139.80.32.250])
	by swi.psy.uva.nl (8.9.3/8.9.3) with ESMTP id HAA29173
	for <prolog@swi.psy.uva.nl>; Fri, 7 Apr 2000 07:20:38 +0200 (MET DST)
Received: (from ok@localhost)
	by atlas.otago.ac.nz (8.9.3/8.9.3) id RAA24083;
	Fri, 7 Apr 2000 17:20:52 +1200 (NZST)
Date: Fri, 7 Apr 2000 17:20:52 +1200 (NZST)
From: "Richard A. O'Keefe" <ok@atlas.otago.ac.nz>
Message-Id: <200004070520.RAA24083@atlas.otago.ac.nz>
To: gunnar.lindholm.320@student.lu.se, prolog@swi.psy.uva.nl
Subject: Re:  Please refresh my memory

	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.)

