Subject: [SWIPL] Basic Newby question

From: Michael J Lew <[email-masked]>
Date: Tue, 20 Mar 2001 13:46:44 -0800 (PST)

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