Hey i was working on this little method i guess you call them messing around trying to get my grip on swi-prolog before I have my big project assigned in a week or so at university. Its pretty obvious what it does say i say “colors(yellow,F). it will give me banana, lemon and so on…
colors(C,F):-fruits(F,C)
Now my question is i know i can use list_to_set(F, (something else)), to make the output into one list instead of having to hit ‘;’ to get all of the fruits. THOUGH… is there anyway i can incorporate the list making into the actual method?
cheers!
Okay found out how to:
simple enough, just had to stick it in there. Thanks Anyways!