I'm trying to write a function that will test to see if the word hello is contained in a list. If it is contained, i don't want it to say "true", i want it to say : "yes, the word hello is contained here", any ideas?
Here's my code :
contains_hello([hello|_]).
contains_hello([Head|Tail]):- Head \= hello, contains_hello(Tail).