From Randy.Justice@cnet.navy.mil  Wed Sep  6 20:54:32 2000
Received: from smtp.cnet.navy.mil (smtp.cnet.navy.Mil [160.125.64.11])
	by swi.psy.uva.nl (8.9.3/8.9.3) with ESMTP id UAA16137
	for <prolog@swi.psy.uva.nl>; Wed, 6 Sep 2000 20:54:31 +0200 (MET DST)
Received: from penx68322m1.cnet.navy.mil (pens0394.cnet.navy.Mil [160.125.210.190])
	by smtp.cnet.navy.mil (8.9.3 (PHNE_18979)/8.9.3) with ESMTP id NAA20301
	for <prolog@swi.psy.uva.nl>; Wed, 6 Sep 2000 13:54:09 -0500 (CDT)
Received: by pens0394.cnet.navy.Mil with Internet Mail Service (5.5.2650.21)
	id <SFZJK2FB>; Wed, 6 Sep 2000 13:56:31 -0500
Message-ID: <B4CA1F5D8D23D411ADC7009027E791BF1DF4E4@pens0394.cnet.navy.Mil>
From: "Justice, Randy -CONT" <Randy.Justice@cnet.navy.mil>
To: "Prolog@Swi. Psy. Uva. Nl (E-mail)" <prolog@swi.psy.uva.nl>
Subject: Removing the first element
Date: Wed, 6 Sep 2000 13:56:24 -0500 
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2650.21)
Content-Type: text/plain;
	charset="iso-8859-1"

I was trying to remove the first element of the list and return the results
in the parameter.
I have two rules: test  and test1.   Why don't test1 work?   What is the
fundamental rule that I am missing??  How does one assign a value to a
parameter --(with numbers one can use "is") ?

test(X):-
   write(X),
   write('\n'),
   [Y|Z] = X,
   write(Y),
   write('\n'),
   write(Z).

test1(X):-
   write(X),
   write('\n'),
   [Y|X] = X,
   write(Y),
   write('\n'),
   write(X).

?- test([[1,2],[1,2,3,4]]).
[[1, 2], [1, 2, 3, 4]]
[1, 2]
[[1, 2, 3, 4]]

Yes
?- test1([[1,2],[1,2,3,4]]).
[[1, 2], [1, 2, 3, 4]]

No


Thanks again... 

Randy

