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 would be greatly appreciated.
Thank you.
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 would be greatly appreciated.
Thank you.