count.pl

loading
details
attribute value
description
owner Johannes Waldmann
uploaded 2017-08-17 03:45:08.0
disk size 282 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
%Source: http://research.cs.queensu.ca/home/cisc260/2015w/examples/Arithmetic.pl
%query:count(g,g,f).
count(Item,[],0).
count(Item,[X|Xs],Result) :-
	Item = X,
	count(Item,Xs,TailCount),
	Result is TailCount+1.
count(Item,[X|Xs],TailCount) :-
	Item \= X,
	count(Item,Xs,TailCount).
popout

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

actions get anonymous link download benchmark