length.pl

loading
details
attribute value
description
owner Johannes Waldmann
uploaded 2017-08-17 03:45:07.0
disk size 452 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: len(i,o).
%% len(Xs, X) :- X is the length of the list Xs.
%%

%TWTYPES     :- type len(list,nat).

len([], 0).
len([_ | Ts], s(N)) :- len(Ts, N).


/*TWDESC

 len(Xs, X) :- X is the length of the list Xs.

*/


/*TWTYPES

list([]).
list([X|Xs]) :-
	poly(X),
	list(Xs).

poly(dummy).

nat(0).
nat(s(X)) :- nat(X).

*/


/*TWDEMO

selected_norms([list,nat,poly]).

query(len(b,f,f,f,f,f)).
query(len(f,f,b,f,f,f)).
query(len(f,f,f,f,b,f)).

*/

popout

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

actions get anonymous link download benchmark