, = &
:- as
the reverse implication symbol.
sister (X, Y) :- female (Y), parent (X, M, F), parent (Y, M, F).
[a,b,c,d]
[Head|Tail]
person(eve). person(X) :- mother(X,Y),person(Y). mother(suzie,eve). mother(joan,suzie).
member(X, [X|_]). member(X,[_|Y]) :- member(X,Y).
isa(elephant,mammal).
isa(clyde,elephant).
hasprop(mammal,legnumber,4).
hasprop(elephant,weight,1000).
hasproperty(Entity,Property,Value) :-
hasprop(Entity,Property,Value).
hasproperty(Entity,Property,Value) :-
hasproperty(Superentity,Property,Value), !,
isa(Entity,Superentity).
append1([],X,X).
append1([Xhead|Xtail],Y,[Xhead|Z]) :-
append1(Xtail,Y,Z).
Last updated: 19 February 1996
URL: http://www.indiana.edu/~gasser/Q351/prolog.html
Comments:
gasser@salsa.indiana.edu
Copyright 1996,
The Trustees of
Indiana University