Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 22 lines (15 sloc) 372 Bytes
:- object(demodb,
implements(databasep)).
%%Some simple test programs.
append([], Ys, Ys) <- true.
append([X|Xs], Ys, [X|Zs]) <-
append(Xs, Ys, Zs).
nrev([], []) <- true.
nrev([X|Xs], Reversed) <-
nrev(Xs, Reversed1) &
append(Reversed1, [X], Reversed).
length([], 0) <- true.
length([_|Xs], N) <-
length(Xs, N0) &
{N is N0 + 1}.
:- end_object.
Jump to Line
Something went wrong with that request. Please try again.