I am fairly new to Prolog and Aleph and need help with the following.
There are two lists: list_A and list_B, where list_A is a shorter list than list_B. For each item in list_A I want to check whether it is present in list_B. I have the following code for the same:
But the problem is that I want to input list_A dynamically and want to define the elements of list_B from a database. For the output, I then want to list the elements that matched as a result.
So, for example,
list_B = [cho,pip,lib,exo,ram,lik,mangoes]
then I want that my program inputs a list from a sentence, say the sentence is ‘I like mangoes’ then the list should read list_A = [like,mangoes]
Ah ok, I was confused by the ; besides true that I tought meant that mangoes was the second solution.
You can now try to modify your predicate common_list with the extra argument