Im trying to figure out how write a predicate which replaces any occurence of a known color in a list with the word 'choice'. Known colors: red, green blue.
Eg:
?-color([the,hall,is,red,the,room,is,blue,and,green],R).
R=[the,hall,is,choice,the,room,is,choice,and,choice]
More(y/n)
Any help...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.