Welcome!
Log In
Create A New Profile
Home
>
2010
>
COS451G
> Topic
Advanced
Ok, I'm stuck
Posted by
Kilhra
Announcements
Last Post
SoC Curricula
09/30/2017 01:08PM
Demarcation or scoping of examinations and assessment
02/13/2017 07:59AM
School of Computing Short Learning Programmes
11/24/2014 08:37AM
Unisa contact information
07/28/2011 01:28PM
Forums
Messages
New
Kilhra
Ok, I'm stuck
April 23, 2010 07:20PM
Registered: 18 years ago
Posts: 1,138
Rating: 0
I've just started with chapter 3 and for the life of me I can not get the membership relation to work.
M code looks as follows:
member(X,[X|Tail]). member(X,[Head|Tail]) :- member(X,Tail).
if I input something like
?- member(b,[a,b,c]).
i get 'no' in return
What am I doing wrong?
i ooked for examples on the net, even copied and pasted some example code for this, but it will not work.
Reply
Quote
Kilhra
Re: Ok, I'm stuck
April 23, 2010 07:46PM
Registered: 18 years ago
Posts: 1,138
Rating: 0
*sigh*
i was using the listener the wrong way.
Have to start it and say consult.
Though I can't remember doing it previously (it has been a couple of weeks though)
Reply
Quote
Newer Topic
Older Topic
Print View
RSS
Sorry, only registered users may post in this forum.
Click here to login