From ok@atlas.otago.ac.nz Mon Mar 19 01:51:47 2001
Received: from atlas.otago.ac.nz (atlas.otago.ac.nz [139.80.32.250])
	by swi.psy.uva.nl (8.11.2/8.11.2) with ESMTP id f2J0pjZ27376
	for <prolog@swi.psy.uva.nl>; Mon, 19 Mar 2001 01:51:46 +0100 (MET)
Received: (from ok@localhost)
	by atlas.otago.ac.nz (8.9.3/8.9.3) id MAA10935;
	Mon, 19 Mar 2001 12:51:13 +1200 (NZST)
Date: Mon, 19 Mar 2001 12:51:13 +1200 (NZST)
From: "Richard A. O'Keefe" <ok@atlas.otago.ac.nz>
Message-Id: <200103190051.MAA10935@atlas.otago.ac.nz>
To: h2000500@bits-pilani.ac.in, prolog@swi.psy.uva.nl
Subject: Re:  [SWIPL] biginer's question.

Prasad Manjre <h2000500@bits-pilani.ac.in> wrote:

    we can delete the contents of the list. ok. But can we use that deleted
    list again in the program? or rather in the other loop of the same
    program?
	
Which list?  Represented how?  What do you mean by "delete"?

If you represent Prolog data as terms (node-labelled trees with holes)
then you can fill in the holes, but you cannot change things.
In particular, if
	X = [1,2,3,4]
and you want to remove 2 from X, you *CAN'T*.  All you can do is
create *another* list
	select(2, X, X1)
=>	X1 = [1,3,4]
but X still has its original value and can be used any way you want.

If you represent data as facts in the data base, then you are back in
the sublunar world of change and decay.  (Well, maybe not decay.)

