makefoods0 :-
    assert(food(apple)), assert(food(broccoli)), assert(food(carrot)),    
    assert(food(lettuce)),    assert(food(rice)).
    
makefoods :-
    retractall(food(_)),
    assert(food(apple)),
    assert(food(broccoli)), assert(food(carrot)),    
    assert(food(lettuce)), assert(food(rice)).

rmfood(C) :- food(F), color(F,C),
    retract(food(F)),
    write('Removed '), write(F), nl, fail.


color(dirt, brown).
color(grass, green).
color(broccoli, green).
color(lettuce, green).
color(apple, red).
color(carrot, orange).
color(orange,orange).
color(rice, white).         

likes(bob, carrot).
likes(bob, apple).
likes(joe, lettuce).
likes(mary, broccoli).
likes(mary, tomato).
likes(bob, mary).
likes(mary, joe).
likes(joe, baseball).
likes(mary, baseball).
likes(jim, baseball).

inedible(X) :- \+food(X).
