applast.pl

loading
details
attribute value
description
owner Johannes Waldmann
uploaded 2017-08-17 03:45:07.0
disk size 311 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
%query: goal(i,o,o).

/* from Michael Leuschel's DPPD collection */

goal(A,B,C) :- s2l(A,D), applast(D,B,C).

applast(L,X,Last) :- append(L,[X],LX),last(Last,LX).

last(X,[X]).
last(X,[H|T]) :- last(X,T).

append([],L,L).
append([H|L1],L2,[H|L3]) :- append(L1,L2,L3).

s2l(s(X),[Y|Xs]):- s2l(X,Xs).
s2l(0, []).
popout

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

actions get anonymous link download benchmark