What I am trying to do, is use a rule such as : which_system(Component).
That will return the info on a system that is declared in a fact liek :
spec([execomp211, hard_disk(40), ram(ram500MB), processor(intel_core2_duo)]).
So if i entered : which_system(hard_disk(120)). into the console then it would return the info about that system.
I've been told to use the methods:
member1(X, [X|Y]).
member1(X, [Z|Y]):-
member1(X,Y).
But I can't seem to find anymore help than that online! I'm not asking to do this for me, jsut any pointers would bemuch appreciated
Thanks


This topic is locked









