Subject: Re: [SWIPL] biginer's question.

From: "Richard A. O'Keefe" <[email-masked]>
Date: Mon, 19 Mar 2001 12:51:13 +1200 (NZST)

Prasad Manjre <[email-masked]> 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.)