From mlew@cs.ucr.edu Tue Mar 20 22:46:47 2001
Received: from barrichello.cs.ucr.edu (barrichello.cs.ucr.edu [138.23.169.5])
	by swi.psy.uva.nl (8.11.2/8.11.2) with ESMTP id f2KLklZ00611
	for <prolog@swi.psy.uva.nl>; Tue, 20 Mar 2001 22:46:47 +0100 (MET)
Received: by barrichello.cs.ucr.edu (Postfix, from userid 2)
	id E97A52547E; Tue, 20 Mar 2001 13:46:45 -0800 (PST)
Received: from hill.cs.ucr.edu (hill.cs.ucr.edu [138.23.169.9])
	by barrichello.cs.ucr.edu (Postfix) with ESMTP id DB3832547B
	for <prolog@swi.psy.uva.nl>; Tue, 20 Mar 2001 13:46:44 -0800 (PST)
Received: by hill.cs.ucr.edu (Postfix, from userid 8206)
	id 707C81C65A; Tue, 20 Mar 2001 13:46:44 -0800 (PST)
Received: from localhost (localhost [127.0.0.1])
	by hill.cs.ucr.edu (Postfix) with ESMTP id 471CF1C659
	for <prolog@swi.psy.uva.nl>; Tue, 20 Mar 2001 13:46:44 -0800 (PST)
Date: Tue, 20 Mar 2001 13:46:44 -0800 (PST)
From: Michael J Lew <mlew@cs.ucr.edu>
To: <prolog@swi.psy.uva.nl>
In-Reply-To: <Pine.LNX.4.30.0103201324170.19598-100000@hill.cs.ucr.edu>
Message-ID: <Pine.LNX.4.30.0103201345290.19598-100000@hill.cs.ucr.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-AntiVirus: scanned for viruses by AMaViS perl-6
Subject: [SWIPL] Basic Newby question

I'm having trouble extracting facts to a list...
I can't seem to figure out how to for example - extract
all the names of the happy people to a list, because there
is no 'non member' function so i end up with infinate
recursion with the first matching rule inserted to the
list an infinte number of times.

mood(bob,happy).
mood(chirs,angry).
mood(sally,happy).

find_mood(Mood,[Head|Tail])
mood(Name,Mood),
Head = [X|Head],
find_mood(Mood,[Tail]).

I think what I need a how to determine that something is
not a member, i just have no idea how to accomplish this
Thanks

Michael Lew

