您好我想制作一个亲日志计划。有四个朋友,他们有自己喜欢的食物清单。他们去餐馆。餐厅里有自己的食物清单。所以四个朋友和餐厅的美食菜单共同的美食节目在节目中。我尝试了一个星期但没有解决方案我得到....
likes(sam,dahl).
likes(sam,chop_suey).
likes(sam,pizza).
likes(sam,chips).
likes(sam,curry).
likes(sami,dahl).
likes(sami,bread).
likes(sami,pizza).
likes(sami,egg).
likes(sami,curry).
likes(samim,dahl).
likes(samim,bread).
likes(samim,pizza).
likes(samim,fruit).
likes(samim,curry).
likes(samima,dahl).
likes(samima,chop_suey).
likes(samima,pizza).
likes(samima,bif).
likes(samima,curry).
resturant(menu,dahl).
resturant(menu,pizza).
resturant(menu,curry).
resturant(menu,bif).
resturant(menu,fruit).
//here i need a function that can intersection sam sami samim and samima food list and also resturant menu food list.