Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 31 lines (24 sloc) 0.561 kb
5d3fadb @norm2782 Split the library up into an executable and a library
norm2782 authored
1 ma(mien,juul).
2 ma(juul,bea).
3 ma(bea,alex).
4 ma(bea,cons).
5 oma(X,Z):-ma(X,Y),ouder(Y,Z).
6
7 append(nil,X,X).
8 append(cons(A,X), Y, cons(A,Z)):- append(X,Y,Z) .
9
10 pa(alex,ale).
11 pa(alex,ama).
12 pa(alex,ari).
13 ma(max,ale).
14 ma(max,ama).
15 ma(max,ari).
23887b0 @norm2782 Add more example rules
norm2782 authored
16 ma(bea,con).
17 ma(bea,fri).
18
19 elem(X, cons(X,Y)).
20 elem(X, cons(Z,Y)) :- elem (X, Y).
21 man(X) :- elem(X, cons(claus, cons(alex, cons(con, cons(fri, empty))))).
5d3fadb @norm2782 Split the library up into an executable and a library
norm2782 authored
22
23 ouder(X,Y) :- pa(X,Y).
24 ouder(X,Y) :- ma(X,Y).
25
26 voor(X,Y) :- ouder(X,Y).
27 voor(X,Y) :- ouder(X,Z), voor(Z,Y).
28
29 plus(zero,X,X).
30 plus(succ(X), Y, succ(Z)) :- plus(X, Y,Z).
Something went wrong with that request. Please try again.