lessleaves.pl

loading
details
attribute value
description
owner Johannes Waldmann
uploaded 2017-08-17 03:45:17.0
disk size 355 Bytes
downloadable true
type
attribute value
name no_type
processor id 1
description this is the default benchmark type for rejected benchmarks and benchmarks that are not associated with a type.
owning community none
loading contents
% Adapted from LP/SGST06/lessleaves.pl
% terminating

%query: lessleaves(i,i).
lessleaves(nil,cons(_,_)).
lessleaves(cons(U,V),cons(W,Z)) :- app(U,V,U1), app(W,Z,W1), lessleaves(U1,W1).

app(nil,Y,Z) :- !, eq(Y,Z).
app(X,Y,cons(U,Z)) :- head(X,U), tail(X,V), app(V,Y,Z).

head([],_).
head([X|_],X).

tail([],[]).
tail([_|X],X).

eq(X,X).
popout

content may be truncated. 'popout' for larger text window.

actions get anonymous link download benchmark